3.2.93 \(\int \csc (x) \sec (x) \, dx\) [193]

Optimal. Leaf size=3 \[ \log (\tan (x)) \]

[Out]

ln(tan(x))

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 3, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {2700, 29} \begin {gather*} \log (\tan (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[x]*Sec[x],x]

[Out]

Log[Tan[x]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 2700

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rubi steps

\begin {gather*} \begin {aligned} \text {Integral} &=\text {Subst}\left (\int \frac {1}{x} \, dx,x,\tan (x)\right )\\ &=\log (\tan (x))\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(9\) vs. \(2(3)=6\).
time = 0.01, size = 9, normalized size = 3.00 \begin {gather*} -\log (\cos (x))+\log (\sin (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]*Sec[x],x]

[Out]

-Log[Cos[x]] + Log[Sin[x]]

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 4, normalized size = 1.33

method result size
default \(\ln \left (\tan \left (x \right )\right )\) \(4\)
risch \(\ln \left ({\mathrm e}^{2 i x}-1\right )-\ln \left ({\mathrm e}^{2 i x}+1\right )\) \(20\)
norman \(-\ln \left (\tan \left (\frac {x}{2}\right )-1\right )-\ln \left (1+\tan \left (\frac {x}{2}\right )\right )+\ln \left (\tan \left (\frac {x}{2}\right )\right )\) \(25\)
parallelrisch \(-\ln \left (\tan \left (\frac {x}{2}\right )-1\right )-\ln \left (1+\tan \left (\frac {x}{2}\right )\right )+\ln \left (\tan \left (\frac {x}{2}\right )\right )\) \(25\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)*sec(x),x,method=_RETURNVERBOSE)

[Out]

ln(tan(x))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 17 vs. \(2 (3) = 6\).
time = 0.40, size = 17, normalized size = 5.67 \begin {gather*} -\frac {1}{2} \, \log \left (\sin \left (x\right )^{2} - 1\right ) + \frac {1}{2} \, \log \left (\sin \left (x\right )^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)*sec(x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 19 vs. \(2 (3) = 6\).
time = 0.59, size = 19, normalized size = 6.33 \begin {gather*} -\frac {1}{2} \, \log \left (\cos \left (x\right )^{2}\right ) + \frac {1}{2} \, \log \left (-\frac {1}{4} \, \cos \left (x\right )^{2} + \frac {1}{4}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)*sec(x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 14 vs. \(2 (3) = 6\).
time = 0.05, size = 14, normalized size = 4.67 \begin {gather*} - \frac {\log {\left (\sin ^{2}{\left (x \right )} - 1 \right )}}{2} + \log {\left (\sin {\left (x \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)*sec(x),x)

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 16 vs. \(2 (3) = 6\).
time = 0.48, size = 16, normalized size = 5.33 \begin {gather*} -\frac {1}{2} \, \log \left (-\sin \left (x\right )^{2} + 1\right ) + \log \left ({\left | \sin \left (x\right ) \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)*sec(x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.10, size = 3, normalized size = 1.00 \begin {gather*} \ln \left (\mathrm {tan}\left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)*sin(x)),x)

[Out]

log(tan(x))

________________________________________________________________________________________

Chatgpt [F] Failed to verify
time = 1.00, size = 3, normalized size = 1.00 \begin {gather*} \frac {\pi }{2} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

int(csc(x)*sec(x),x)

[Out]

1/2*Pi

________________________________________________________________________________________