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

Optimal. Leaf size=13 \[ \frac {\tanh ^{-1}(\sin (2 a x))}{2 a} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3855} \begin {gather*} \frac {\tanh ^{-1}(\sin (2 a x))}{2 a} \end {gather*}

Antiderivative was successfully verified.

[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*} \int \sec (2 a x) \, dx &=\frac {\tanh ^{-1}(\sin (2 a x))}{2 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(37\) vs. \(2(13)=26\).
time = 0.01, size = 37, normalized size = 2.85 \begin {gather*} -\frac {\log (\cos (a x)-\sin (a x))}{2 a}+\frac {\log (\cos (a x)+\sin (a x))}{2 a} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/2*Log[Cos[a*x] - Sin[a*x]]/a + Log[Cos[a*x] + Sin[a*x]]/(2*a)

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 18, normalized size = 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\)
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\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 4.54, size = 17, normalized size = 1.31 \begin {gather*} \frac {\log \left (\sec \left (2 \, a x\right ) + \tan \left (2 \, a x\right )\right )}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 26 vs. \(2 (11) = 22\).
time = 0.62, size = 26, normalized size = 2.00 \begin {gather*} \frac {\log \left (\sin \left (2 \, a x\right ) + 1\right ) - \log \left (-\sin \left (2 \, a x\right ) + 1\right )}{4 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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] Leaf count of result is larger than twice the leaf count of optimal. 27 vs. \(2 (10) = 20\).
time = 0.05, size = 27, normalized size = 2.08 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 40 vs. \(2 (11) = 22\).
time = 1.30, size = 40, normalized size = 3.08 \begin {gather*} \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.23, size = 11, normalized size = 0.85 \begin {gather*} \frac {\mathrm {atanh}\left (\sin \left (2\,a\,x\right )\right )}{2\,a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________