3.1.5 \(\int -\sec (\frac {\pi }{4}+2 x) \, dx\) [5]

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

[Out]

-1/2*arctanh(sin(1/4*Pi+2*x))

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3855} \begin {gather*} -\frac {1}{2} \tanh ^{-1}\left (\sin \left (2 x+\frac {\pi }{4}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[-Sec[Pi/4 + 2*x],x]

[Out]

-1/2*ArcTanh[Sin[Pi/4 + 2*x]]

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 \left (\frac {\pi }{4}+2 x\right ) \, dx &=-\frac {1}{2} \tanh ^{-1}\left (\sin \left (\frac {\pi }{4}+2 x\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 15, normalized size = 1.00 \begin {gather*} -\frac {1}{2} \tanh ^{-1}\left (\sin \left (\frac {\pi }{4}+2 x\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[-Sec[Pi/4 + 2*x],x]

[Out]

-1/2*ArcTanh[Sin[Pi/4 + 2*x]]

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 21, normalized size = 1.40

method result size
derivativedivides \(-\frac {\ln \left (\sec \left (\frac {\pi }{4}+2 x \right )+\tan \left (\frac {\pi }{4}+2 x \right )\right )}{2}\) \(21\)
default \(-\frac {\ln \left (\sec \left (\frac {\pi }{4}+2 x \right )+\tan \left (\frac {\pi }{4}+2 x \right )\right )}{2}\) \(21\)
norman \(\frac {\ln \left (\tan \left (\frac {\pi }{8}+x \right )-1\right )}{2}-\frac {\ln \left (\tan \left (\frac {\pi }{8}+x \right )+1\right )}{2}\) \(24\)
risch \(\frac {\ln \left ({\mathrm e}^{\frac {i \left (\pi +8 x \right )}{4}}-i\right )}{2}-\frac {\ln \left ({\mathrm e}^{\frac {i \left (\pi +8 x \right )}{4}}+i\right )}{2}\) \(32\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/cos(1/4*Pi+2*x),x,method=_RETURNVERBOSE)

[Out]

-1/2*ln(sec(1/4*Pi+2*x)+tan(1/4*Pi+2*x))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-1/cos(1/4*pi+2*x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-1/cos(1/4*pi+2*x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 22, normalized size = 1.47 \begin {gather*} \frac {\log {\left (\tan {\left (x + \frac {\pi }{8} \right )} - 1 \right )}}{2} - \frac {\log {\left (\tan {\left (x + \frac {\pi }{8} \right )} + 1 \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-1/cos(1/4*pi+2*x),x)

[Out]

log(tan(x + pi/8) - 1)/2 - log(tan(x + pi/8) + 1)/2

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(-1/cos(1/4*pi+2*x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.21, size = 24, normalized size = 1.60 \begin {gather*} -\frac {\ln \left (\frac {\sin \left (\frac {\Pi }{4}+2\,x\right )+1}{\cos \left (\frac {\Pi }{4}+2\,x\right )}\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/cos(Pi/4 + 2*x),x)

[Out]

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

________________________________________________________________________________________