\(\int \sec (2 a x) \, dx\) [3]

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

Optimal result

Integrand size = 5, antiderivative size = 13 \[ \int \sec (2 a x) \, dx=\frac {\text {arctanh}(\sin (2 a x))}{2 a} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3855} \[ \int \sec (2 a x) \, dx=\frac {\text {arctanh}(\sin (2 a x))}{2 a} \]

[In]

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

[Out]

ArcTanh[Sin[2*a*x]]/(2*a)

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {arctanh}(\sin (2 a x))}{2 a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00 \[ \int \sec (2 a x) \, dx=\frac {\text {arctanh}(\sin (2 a x))}{2 a} \]

[In]

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

[Out]

ArcTanh[Sin[2*a*x]]/(2*a)

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.38

method result size
derivativedivides \(\frac {\ln \left (\sec \left (2 a x \right )+\tan \left (2 a x \right )\right )}{2 a}\) \(18\)
default \(\frac {\ln \left (\sec \left (2 a x \right )+\tan \left (2 a x \right )\right )}{2 a}\) \(18\)
parallelrisch \(\frac {-\ln \left (\tan \left (a x \right )-1\right )+\ln \left (\tan \left (a x \right )+1\right )}{2 a}\) \(23\)
norman \(-\frac {\ln \left (\tan \left (a x \right )-1\right )}{2 a}+\frac {\ln \left (\tan \left (a x \right )+1\right )}{2 a}\) \(26\)
risch \(\frac {\ln \left ({\mathrm e}^{2 i a x}+i\right )}{2 a}-\frac {\ln \left ({\mathrm e}^{2 i a x}-i\right )}{2 a}\) \(32\)

[In]

int(sec(2*a*x),x,method=_RETURNVERBOSE)

[Out]

1/2/a*ln(sec(2*a*x)+tan(2*a*x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 26 vs. \(2 (11) = 22\).

Time = 0.30 (sec) , antiderivative size = 26, normalized size of antiderivative = 2.00 \[ \int \sec (2 a x) \, dx=\frac {\log \left (\sin \left (2 \, a x\right ) + 1\right ) - \log \left (-\sin \left (2 \, a x\right ) + 1\right )}{4 \, a} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 27 vs. \(2 (10) = 20\).

Time = 0.07 (sec) , antiderivative size = 27, normalized size of antiderivative = 2.08 \[ \int \sec (2 a x) \, dx=\begin {cases} \frac {- \frac {\log {\left (\sin {\left (2 a x \right )} - 1 \right )}}{2} + \frac {\log {\left (\sin {\left (2 a x \right )} + 1 \right )}}{2}}{2 a} & \text {for}\: a \neq 0 \\x & \text {otherwise} \end {cases} \]

[In]

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

[Out]

Piecewise(((-log(sin(2*a*x) - 1)/2 + log(sin(2*a*x) + 1)/2)/(2*a), Ne(a, 0)), (x, True))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.31 \[ \int \sec (2 a x) \, dx=\frac {\log \left (\sec \left (2 \, a x\right ) + \tan \left (2 \, a x\right )\right )}{2 \, a} \]

[In]

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

[Out]

1/2*log(sec(2*a*x) + tan(2*a*x))/a

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 40 vs. \(2 (11) = 22\).

Time = 0.28 (sec) , antiderivative size = 40, normalized size of antiderivative = 3.08 \[ \int \sec (2 a x) \, dx=\frac {\log \left ({\left | \frac {1}{\sin \left (2 \, a x\right )} + \sin \left (2 \, a x\right ) + 2 \right |}\right ) - \log \left ({\left | \frac {1}{\sin \left (2 \, a x\right )} + \sin \left (2 \, a x\right ) - 2 \right |}\right )}{8 \, a} \]

[In]

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

[Out]

1/8*(log(abs(1/sin(2*a*x) + sin(2*a*x) + 2)) - log(abs(1/sin(2*a*x) + sin(2*a*x) - 2)))/a

Mupad [B] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.85 \[ \int \sec (2 a x) \, dx=\frac {\mathrm {atanh}\left (\sin \left (2\,a\,x\right )\right )}{2\,a} \]

[In]

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

[Out]

atanh(sin(2*a*x))/(2*a)