3.4.1 \(\int \csc (x) \log (\tan (x)) \sec (x) \, dx\) [301]

Optimal. Leaf size=9 \[ \frac {1}{2} \log ^2(\tan (x)) \]

[Out]

1/2*ln(tan(x))^2

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {2700, 29, 6818} \begin {gather*} \frac {1}{2} \log ^2(\tan (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Tan[x]]^2/2

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]

Rule 6818

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*(y^(m + 1)/(m + 1)), x] /;  !F
alseQ[q]] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin {align*} \int \csc (x) \log (\tan (x)) \sec (x) \, dx &=\frac {1}{2} \log ^2(\tan (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 9, normalized size = 1.00 \begin {gather*} \frac {1}{2} \log ^2(\tan (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Tan[x]]^2/2

________________________________________________________________________________________

Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded in comparison} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

mathics('Integrate[Log[Tan[x]]/(Sin[x]*Cos[x]),x]')

[Out]

cought exception: maximum recursion depth exceeded in comparison

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 8, normalized size = 0.89

method result size
derivativedivides \(\frac {\ln \left (\tan \left (x \right )\right )^{2}}{2}\) \(8\)
default \(\frac {\ln \left (\tan \left (x \right )\right )^{2}}{2}\) \(8\)
risch \(\frac {\ln \left ({\mathrm e}^{2 i x}+1\right )^{2}}{2}-\ln \left ({\mathrm e}^{2 i x}-1\right ) \ln \left ({\mathrm e}^{2 i x}+1\right )+\frac {\ln \left ({\mathrm e}^{2 i x}-1\right )^{2}}{2}-\frac {i \ln \left ({\mathrm e}^{2 i x}-1\right ) \pi \mathrm {csgn}\left (\frac {{\mathrm e}^{2 i x}-1}{{\mathrm e}^{2 i x}+1}\right )^{3}}{2}+\frac {i \ln \left ({\mathrm e}^{2 i x}+1\right ) \pi \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right )^{3}}{2}+\frac {i \pi \ln \left ({\mathrm e}^{2 i x}+1\right )}{2}-\frac {i \ln \left ({\mathrm e}^{2 i x}+1\right ) \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )\right ) \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right )^{2}}{2}+\frac {i \ln \left ({\mathrm e}^{2 i x}+1\right ) \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i x}+1}\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )\right ) \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right )}{2}-\frac {i \ln \left ({\mathrm e}^{2 i x}-1\right ) \pi \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right )^{3}}{2}-\frac {i \ln \left ({\mathrm e}^{2 i x}-1\right ) \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i x}+1}\right ) \mathrm {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )\right ) \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right )}{2}+\frac {i \ln \left ({\mathrm e}^{2 i x}+1\right ) \pi \mathrm {csgn}\left (\frac {{\mathrm e}^{2 i x}-1}{{\mathrm e}^{2 i x}+1}\right )^{3}}{2}+\frac {i \ln \left ({\mathrm e}^{2 i x}-1\right ) \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i x}+1}\right ) \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right )^{2}}{2}-\frac {i \ln \left ({\mathrm e}^{2 i x}+1\right ) \pi \,\mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right ) \mathrm {csgn}\left (\frac {{\mathrm e}^{2 i x}-1}{{\mathrm e}^{2 i x}+1}\right )^{2}}{2}-\frac {i \pi \ln \left ({\mathrm e}^{2 i x}-1\right )}{2}+\frac {i \ln \left ({\mathrm e}^{2 i x}-1\right ) \pi \mathrm {csgn}\left (\frac {{\mathrm e}^{2 i x}-1}{{\mathrm e}^{2 i x}+1}\right )^{2}}{2}-\frac {i \ln \left ({\mathrm e}^{2 i x}+1\right ) \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i x}+1}\right ) \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right )^{2}}{2}+\frac {i \ln \left ({\mathrm e}^{2 i x}+1\right ) \pi \,\mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right ) \mathrm {csgn}\left (\frac {{\mathrm e}^{2 i x}-1}{{\mathrm e}^{2 i x}+1}\right )}{2}+\frac {i \ln \left ({\mathrm e}^{2 i x}-1\right ) \pi \,\mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right ) \mathrm {csgn}\left (\frac {{\mathrm e}^{2 i x}-1}{{\mathrm e}^{2 i x}+1}\right )^{2}}{2}-\frac {i \ln \left ({\mathrm e}^{2 i x}+1\right ) \pi \mathrm {csgn}\left (\frac {{\mathrm e}^{2 i x}-1}{{\mathrm e}^{2 i x}+1}\right )^{2}}{2}-\frac {i \ln \left ({\mathrm e}^{2 i x}-1\right ) \pi \,\mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right ) \mathrm {csgn}\left (\frac {{\mathrm e}^{2 i x}-1}{{\mathrm e}^{2 i x}+1}\right )}{2}+\frac {i \ln \left ({\mathrm e}^{2 i x}-1\right ) \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )\right ) \mathrm {csgn}\left (\frac {i \left ({\mathrm e}^{2 i x}-1\right )}{{\mathrm e}^{2 i x}+1}\right )^{2}}{2}\) \(764\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(tan(x))/cos(x)/sin(x),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(tan(x))^2

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 7, normalized size = 0.78 \begin {gather*} \frac {1}{2} \, \log \left (\tan \left (x\right )\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(tan(x))/cos(x)/sin(x),x, algorithm="maxima")

[Out]

1/2*log(tan(x))^2

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 12, normalized size = 1.33 \begin {gather*} \frac {1}{2} \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right )}\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(tan(x))/cos(x)/sin(x),x, algorithm="fricas")

[Out]

1/2*log(sin(x)/cos(x))^2

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\log {\left (\tan {\left (x \right )} \right )}}{\sin {\left (x \right )} \cos {\left (x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(tan(x))/cos(x)/sin(x),x)

[Out]

Integral(log(tan(x))/(sin(x)*cos(x)), x)

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 8, normalized size = 0.89 \begin {gather*} \frac {\ln ^{2}\left (\tan x\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(tan(x))/cos(x)/sin(x),x)

[Out]

1/2*log(tan(x))^2

________________________________________________________________________________________

Mupad [B]
time = 2.59, size = 27, normalized size = 3.00 \begin {gather*} \frac {{\ln \left (-\frac {{\mathrm {e}}^{x\,2{}\mathrm {i}}\,1{}\mathrm {i}-\mathrm {i}}{{\mathrm {e}}^{x\,2{}\mathrm {i}}+1}\right )}^2}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(tan(x))/(cos(x)*sin(x)),x)

[Out]

log(-(exp(x*2i)*1i - 1i)/(exp(x*2i) + 1))^2/2

________________________________________________________________________________________