3.116 \(\int \cos (x) \sec (2 x) \, dx\)

Optimal. Leaf size=15 \[ \frac {\tanh ^{-1}\left (\sqrt {2} \sin (x)\right )}{\sqrt {2}} \]

[Out]

1/2*arctanh(sin(x)*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4356, 206} \[ \frac {\tanh ^{-1}\left (\sqrt {2} \sin (x)\right )}{\sqrt {2}} \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]*Sec[2*x],x]

[Out]

ArcTanh[Sqrt[2]*Sin[x]]/Sqrt[2]

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 4356

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Sin[c*(a + b*x)], x]}, Dist[d/(b
*c), Subst[Int[SubstFor[1, Sin[c*(a + b*x)]/d, u, x], x], x, Sin[c*(a + b*x)]/d], x] /; FunctionOfQ[Sin[c*(a +
 b*x)]/d, u, x]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Cos] || EqQ[F, cos])

Rubi steps

\begin {align*} \int \cos (x) \sec (2 x) \, dx &=\operatorname {Subst}\left (\int \frac {1}{1-2 x^2} \, dx,x,\sin (x)\right )\\ &=\frac {\tanh ^{-1}\left (\sqrt {2} \sin (x)\right )}{\sqrt {2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 15, normalized size = 1.00 \[ \frac {\tanh ^{-1}\left (\sqrt {2} \sin (x)\right )}{\sqrt {2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]*Sec[2*x],x]

[Out]

ArcTanh[Sqrt[2]*Sin[x]]/Sqrt[2]

________________________________________________________________________________________

fricas [B]  time = 1.13, size = 33, normalized size = 2.20 \[ \frac {1}{4} \, \sqrt {2} \log \left (-\frac {2 \, \cos \relax (x)^{2} - 2 \, \sqrt {2} \sin \relax (x) - 3}{2 \, \cos \relax (x)^{2} - 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*sec(2*x),x, algorithm="fricas")

[Out]

1/4*sqrt(2)*log(-(2*cos(x)^2 - 2*sqrt(2)*sin(x) - 3)/(2*cos(x)^2 - 1))

________________________________________________________________________________________

giac [B]  time = 0.13, size = 31, normalized size = 2.07 \[ \frac {1}{4} \, \sqrt {2} \log \left ({\left | \frac {1}{2} \, \sqrt {2} + \sin \relax (x) \right |}\right ) - \frac {1}{4} \, \sqrt {2} \log \left ({\left | -\frac {1}{2} \, \sqrt {2} + \sin \relax (x) \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*sec(2*x),x, algorithm="giac")

[Out]

1/4*sqrt(2)*log(abs(1/2*sqrt(2) + sin(x))) - 1/4*sqrt(2)*log(abs(-1/2*sqrt(2) + sin(x)))

________________________________________________________________________________________

maple [A]  time = 0.13, size = 13, normalized size = 0.87 \[ \frac {\arctanh \left (\sin \relax (x ) \sqrt {2}\right ) \sqrt {2}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)*sec(2*x),x)

[Out]

1/2*arctanh(sin(x)*2^(1/2))*2^(1/2)

________________________________________________________________________________________

maxima [B]  time = 1.08, size = 137, normalized size = 9.13 \[ \frac {1}{8} \, \sqrt {2} \log \left (2 \, \cos \relax (x)^{2} + 2 \, \sin \relax (x)^{2} + 2 \, \sqrt {2} \cos \relax (x) + 2 \, \sqrt {2} \sin \relax (x) + 2\right ) - \frac {1}{8} \, \sqrt {2} \log \left (2 \, \cos \relax (x)^{2} + 2 \, \sin \relax (x)^{2} + 2 \, \sqrt {2} \cos \relax (x) - 2 \, \sqrt {2} \sin \relax (x) + 2\right ) + \frac {1}{8} \, \sqrt {2} \log \left (2 \, \cos \relax (x)^{2} + 2 \, \sin \relax (x)^{2} - 2 \, \sqrt {2} \cos \relax (x) + 2 \, \sqrt {2} \sin \relax (x) + 2\right ) - \frac {1}{8} \, \sqrt {2} \log \left (2 \, \cos \relax (x)^{2} + 2 \, \sin \relax (x)^{2} - 2 \, \sqrt {2} \cos \relax (x) - 2 \, \sqrt {2} \sin \relax (x) + 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*sec(2*x),x, algorithm="maxima")

[Out]

1/8*sqrt(2)*log(2*cos(x)^2 + 2*sin(x)^2 + 2*sqrt(2)*cos(x) + 2*sqrt(2)*sin(x) + 2) - 1/8*sqrt(2)*log(2*cos(x)^
2 + 2*sin(x)^2 + 2*sqrt(2)*cos(x) - 2*sqrt(2)*sin(x) + 2) + 1/8*sqrt(2)*log(2*cos(x)^2 + 2*sin(x)^2 - 2*sqrt(2
)*cos(x) + 2*sqrt(2)*sin(x) + 2) - 1/8*sqrt(2)*log(2*cos(x)^2 + 2*sin(x)^2 - 2*sqrt(2)*cos(x) - 2*sqrt(2)*sin(
x) + 2)

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 12, normalized size = 0.80 \[ \frac {\sqrt {2}\,\mathrm {atanh}\left (\sqrt {2}\,\sin \relax (x)\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/cos(2*x),x)

[Out]

(2^(1/2)*atanh(2^(1/2)*sin(x)))/2

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \cos {\relax (x )} \sec {\left (2 x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)*sec(2*x),x)

[Out]

Integral(cos(x)*sec(2*x), x)

________________________________________________________________________________________