Integrand size = 7, antiderivative size = 45 \[ \int \log \left (a \sin ^2(x)\right ) \, dx=i x^2-2 x \log \left (1-e^{2 i x}\right )+x \log \left (a \sin ^2(x)\right )+i \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \]
[Out]
Time = 0.04 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.857, Rules used = {2628, 12, 3798, 2221, 2317, 2438} \[ \int \log \left (a \sin ^2(x)\right ) \, dx=x \log \left (a \sin ^2(x)\right )+i \operatorname {PolyLog}\left (2,e^{2 i x}\right )+i x^2-2 x \log \left (1-e^{2 i x}\right ) \]
[In]
[Out]
Rule 12
Rule 2221
Rule 2317
Rule 2438
Rule 2628
Rule 3798
Rubi steps \begin{align*} \text {integral}& = x \log \left (a \sin ^2(x)\right )-\int 2 x \cot (x) \, dx \\ & = x \log \left (a \sin ^2(x)\right )-2 \int x \cot (x) \, dx \\ & = i x^2+x \log \left (a \sin ^2(x)\right )+4 i \int \frac {e^{2 i x} x}{1-e^{2 i x}} \, dx \\ & = i x^2-2 x \log \left (1-e^{2 i x}\right )+x \log \left (a \sin ^2(x)\right )+2 \int \log \left (1-e^{2 i x}\right ) \, dx \\ & = i x^2-2 x \log \left (1-e^{2 i x}\right )+x \log \left (a \sin ^2(x)\right )-i \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i x}\right ) \\ & = i x^2-2 x \log \left (1-e^{2 i x}\right )+x \log \left (a \sin ^2(x)\right )+i \text {Li}_2\left (e^{2 i x}\right ) \\ \end{align*}
Time = 0.01 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.96 \[ \int \log \left (a \sin ^2(x)\right ) \, dx=x \left (i x-2 \log \left (1-e^{2 i x}\right )+\log \left (a \sin ^2(x)\right )\right )+i \operatorname {PolyLog}\left (2,e^{2 i x}\right ) \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 85 vs. \(2 (39 ) = 78\).
Time = 1.25 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.91
method | result | size |
default | \(-i \left (\ln \left ({\mathrm e}^{i x}\right ) \ln \left (-a \left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}\right )+\ln \left ({\mathrm e}^{i x}\right )^{2}-2 \ln \left ({\mathrm e}^{i x}\right ) \ln \left ({\mathrm e}^{i x}+1\right )-2 \operatorname {dilog}\left ({\mathrm e}^{i x}+1\right )+2 \operatorname {dilog}\left ({\mathrm e}^{i x}\right )-2 \ln \left (2\right ) \ln \left ({\mathrm e}^{i x}\right )\right )\) | \(86\) |
risch | \(-2 x \ln \left ({\mathrm e}^{i x}\right )+i x^{2}-2 i \ln \left ({\mathrm e}^{i x}\right ) \ln \left ({\mathrm e}^{2 i x}-1\right )+\frac {i \pi \,\operatorname {csgn}\left (i {\mathrm e}^{-2 i x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-2 i x} \left ({\mathrm e}^{2 i x}-1\right )^{2}\right )^{2} x}{2}+\frac {i \pi {\operatorname {csgn}\left (i a \left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}\right )}^{2} \operatorname {csgn}\left (i a \right ) x}{2}+i \pi x -i \pi \,\operatorname {csgn}\left (i {\mathrm e}^{i x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{2 i x}\right )^{2} x +\frac {i \pi {\operatorname {csgn}\left (i a \left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}\right )}^{3} x}{2}-\frac {i \pi {\operatorname {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )^{2}\right )}^{3} x}{2}-2 x \ln \left (2\right )+\ln \left (a \right ) x +\frac {i \pi \operatorname {csgn}\left (i {\mathrm e}^{2 i x}\right )^{3} x}{2}+\frac {i \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )^{2}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-2 i x} \left ({\mathrm e}^{2 i x}-1\right )^{2}\right )^{2} x}{2}-\frac {i \pi {\operatorname {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )\right )}^{2} \operatorname {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )^{2}\right ) x}{2}+2 i \ln \left ({\mathrm e}^{i x}\right ) \ln \left ({\mathrm e}^{i x}+1\right )-\frac {i \pi \,\operatorname {csgn}\left (i {\mathrm e}^{-2 i x} \left ({\mathrm e}^{2 i x}-1\right )^{2}\right ) \operatorname {csgn}\left (i a \left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}\right ) \operatorname {csgn}\left (i a \right ) x}{2}+2 i \operatorname {dilog}\left ({\mathrm e}^{i x}+1\right )+\frac {i \pi \operatorname {csgn}\left (i {\mathrm e}^{i x}\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{2 i x}\right ) x}{2}-2 i \operatorname {dilog}\left ({\mathrm e}^{i x}\right )-i \pi {\operatorname {csgn}\left (i a \left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}\right )}^{2} x +\frac {i \pi \,\operatorname {csgn}\left (i {\mathrm e}^{-2 i x} \left ({\mathrm e}^{2 i x}-1\right )^{2}\right ) {\operatorname {csgn}\left (i a \left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}\right )}^{2} x}{2}-\frac {i \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )^{2}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-2 i x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-2 i x} \left ({\mathrm e}^{2 i x}-1\right )^{2}\right ) x}{2}+i \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )\right ) {\operatorname {csgn}\left (i \left ({\mathrm e}^{2 i x}-1\right )^{2}\right )}^{2} x -\frac {i \pi \operatorname {csgn}\left (i {\mathrm e}^{-2 i x} \left ({\mathrm e}^{2 i x}-1\right )^{2}\right )^{3} x}{2}\) | \(549\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 109 vs. \(2 (34) = 68\).
Time = 0.39 (sec) , antiderivative size = 109, normalized size of antiderivative = 2.42 \[ \int \log \left (a \sin ^2(x)\right ) \, dx=x \log \left (-a \cos \left (x\right )^{2} + a\right ) - x \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - x \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - x \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - x \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + i \, {\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, {\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) - i \, {\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) + i \, {\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right ) \]
[In]
[Out]
\[ \int \log \left (a \sin ^2(x)\right ) \, dx=\int \log {\left (a \sin ^{2}{\left (x \right )} \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 89 vs. \(2 (34) = 68\).
Time = 0.38 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.98 \[ \int \log \left (a \sin ^2(x)\right ) \, dx=i \, x^{2} - 2 i \, x \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) + 2 i \, x \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) + x \log \left (a \sin \left (x\right )^{2}\right ) - x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) - x \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) + 2 i \, {\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) + 2 i \, {\rm Li}_2\left (e^{\left (i \, x\right )}\right ) \]
[In]
[Out]
\[ \int \log \left (a \sin ^2(x)\right ) \, dx=\int { \log \left (a \sin \left (x\right )^{2}\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \log \left (a \sin ^2(x)\right ) \, dx=\int \ln \left (a\,{\sin \left (x\right )}^2\right ) \,d x \]
[In]
[Out]