Optimal. Leaf size=47 \[ \frac {i x^2}{2}-x \log \left (1-e^{2 i x}\right )+x \log (a \sin (x))+\frac {1}{2} i \text {Li}_2\left (e^{2 i x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {2628, 3798,
2221, 2317, 2438} \begin {gather*} \frac {1}{2} i \text {PolyLog}\left (2,e^{2 i x}\right )+x \log (a \sin (x))+\frac {i x^2}{2}-x \log \left (1-e^{2 i x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2317
Rule 2438
Rule 2628
Rule 3798
Rubi steps
\begin {align*} \int \log (a \sin (x)) \, dx &=x \log (a \sin (x))-\int x \cot (x) \, dx\\ &=\frac {i x^2}{2}+x \log (a \sin (x))+2 i \int \frac {e^{2 i x} x}{1-e^{2 i x}} \, dx\\ &=\frac {i x^2}{2}-x \log \left (1-e^{2 i x}\right )+x \log (a \sin (x))+\int \log \left (1-e^{2 i x}\right ) \, dx\\ &=\frac {i x^2}{2}-x \log \left (1-e^{2 i x}\right )+x \log (a \sin (x))-\frac {1}{2} i \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i x}\right )\\ &=\frac {i x^2}{2}-x \log \left (1-e^{2 i x}\right )+x \log (a \sin (x))+\frac {1}{2} i \text {Li}_2\left (e^{2 i x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 42, normalized size = 0.89 \begin {gather*} -x \log \left (1-e^{2 i x}\right )+x \log (a \sin (x))+\frac {1}{2} i \left (x^2+\text {Li}_2\left (e^{2 i x}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 86 vs. \(2 (37 ) = 74\).
time = 0.17, size = 87, normalized size = 1.85
method | result | size |
default | \(-i \left (\ln \left ({\mathrm e}^{i x}\right ) \ln \left (i a \left (1-{\mathrm e}^{2 i x}\right ) {\mathrm e}^{-i x}\right )+\frac {\ln \left ({\mathrm e}^{i x}\right )^{2}}{2}-\ln \left ({\mathrm e}^{i x}\right ) \ln \left ({\mathrm e}^{i x}+1\right )-\dilog \left ({\mathrm e}^{i x}+1\right )+\dilog \left ({\mathrm e}^{i x}\right )-\ln \left (2\right ) \ln \left ({\mathrm e}^{i x}\right )\right )\) | \(87\) |
risch | \(-x \ln \left ({\mathrm e}^{i x}\right )+\frac {i x \pi \,\mathrm {csgn}\left (a \sin \left (x \right )\right ) \mathrm {csgn}\left (i a \sin \left (x \right )\right )}{2}-\frac {i x \pi }{2}+\frac {i x \pi \mathrm {csgn}\left (\sin \left (x \right )\right )^{3}}{2}+\frac {i x \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-i x}\right ) \mathrm {csgn}\left (\sin \left (x \right )\right )^{2}}{2}+i \dilog \left ({\mathrm e}^{i x}+1\right )+\frac {i x \pi \mathrm {csgn}\left (i a \sin \left (x \right )\right )^{2}}{2}-x \ln \left (2\right )+x \ln \left (a \right )-\frac {i x \pi \,\mathrm {csgn}\left (i a \right ) \mathrm {csgn}\left (\sin \left (x \right )\right ) \mathrm {csgn}\left (a \sin \left (x \right )\right )}{2}-\frac {i x \pi \mathrm {csgn}\left (i a \sin \left (x \right )\right )^{3}}{2}+\frac {i x \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-i x}\right ) \mathrm {csgn}\left (\sin \left (x \right )\right )}{2}+\frac {i x \pi \,\mathrm {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )\right ) \mathrm {csgn}\left (\sin \left (x \right )\right )^{2}}{2}+\frac {i x \pi \mathrm {csgn}\left (a \sin \left (x \right )\right )^{3}}{2}-i \ln \left ({\mathrm e}^{i x}\right ) \ln \left ({\mathrm e}^{2 i x}-1\right )-\frac {i x \pi \,\mathrm {csgn}\left (a \sin \left (x \right )\right ) \mathrm {csgn}\left (i a \sin \left (x \right )\right )^{2}}{2}-i \dilog \left ({\mathrm e}^{i x}\right )+\frac {i x^{2}}{2}+\frac {i x \pi \,\mathrm {csgn}\left (i a \right ) \mathrm {csgn}\left (a \sin \left (x \right )\right )^{2}}{2}+i \ln \left ({\mathrm e}^{i x}\right ) \ln \left ({\mathrm e}^{i x}+1\right )-\frac {i x \pi \,\mathrm {csgn}\left (\sin \left (x \right )\right ) \mathrm {csgn}\left (a \sin \left (x \right )\right )^{2}}{2}\) | \(289\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 87 vs. \(2 (32) = 64\).
time = 0.61, size = 87, normalized size = 1.85 \begin {gather*} \frac {1}{2} i \, x^{2} - i \, x \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + i \, x \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) - \frac {1}{2} \, x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) - \frac {1}{2} \, x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) + x \log \left (a \sin \left (x\right )\right ) + i \, {\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) + i \, {\rm Li}_2\left (e^{\left (i \, x\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 104 vs. \(2 (32) = 64\).
time = 0.42, size = 104, normalized size = 2.21 \begin {gather*} x \log \left (a \sin \left (x\right )\right ) - \frac {1}{2} \, x \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - \frac {1}{2} \, x \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - \frac {1}{2} \, x \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - \frac {1}{2} \, x \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + \frac {1}{2} i \, {\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - \frac {1}{2} i \, {\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) - \frac {1}{2} i \, {\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) + \frac {1}{2} i \, {\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \log {\left (a \sin {\left (x \right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \ln \left (a\,\sin \left (x\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________