Optimal. Leaf size=108 \[ -\frac {1}{2} i \left (\left (\log \left (\frac {i-\tan (x)}{i+\sqrt {3}}\right )-\log \left (\frac {i+\tan (x)}{i-\sqrt {3}}\right )\right ) \log \left (\sqrt {3}+\tan (x)\right )-\operatorname {PolyLog}\left (2,\frac {\sqrt {3}+\tan (x)}{-i+\sqrt {3}}\right )+\operatorname {PolyLog}\left (2,\frac {\sqrt {3}+\tan (x)}{i+\sqrt {3}}\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [F]
time = 0.35, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps
used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {}
\begin {gather*} \int \log \left (\sqrt {3}+\tan (x)\right ) \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {Integral} &=x \log \left (\sqrt {3}+\tan (x)\right )-\int \frac {x \sec ^2(x)}{\sqrt {3}+\tan (x)} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 132, normalized size = 1.22 \begin {gather*} -\frac {1}{2} i \log \left (\frac {i-\tan (x)}{i+\sqrt {3}}\right ) \log \left (\sqrt {3}+\tan (x)\right )+\frac {1}{2} i \log \left (\frac {i+\tan (x)}{i-\sqrt {3}}\right ) \log \left (\sqrt {3}+\tan (x)\right )+\frac {1}{2} i \operatorname {PolyLog}\left (2,-\frac {\sqrt {3}+\tan (x)}{i-\sqrt {3}}\right )-\frac {1}{2} i \operatorname {PolyLog}\left (2,\frac {\sqrt {3}+\tan (x)}{i+\sqrt {3}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.43, size = 96, normalized size = 0.89
method | result | size |
derivativedivides | \(-\frac {i \ln \left (\sqrt {3}+\tan \left (x \right )\right ) \ln \left (\frac {i-\tan \left (x \right )}{\sqrt {3}+i}\right )}{2}+\frac {i \ln \left (\sqrt {3}+\tan \left (x \right )\right ) \ln \left (\frac {i+\tan \left (x \right )}{i-\sqrt {3}}\right )}{2}-\frac {i \mathit {dilog}\left (\frac {i-\tan \left (x \right )}{\sqrt {3}+i}\right )}{2}+\frac {i \mathit {dilog}\left (\frac {i+\tan \left (x \right )}{i-\sqrt {3}}\right )}{2}\) | \(96\) |
default | \(-\frac {i \ln \left (\sqrt {3}+\tan \left (x \right )\right ) \ln \left (\frac {i-\tan \left (x \right )}{\sqrt {3}+i}\right )}{2}+\frac {i \ln \left (\sqrt {3}+\tan \left (x \right )\right ) \ln \left (\frac {i+\tan \left (x \right )}{i-\sqrt {3}}\right )}{2}-\frac {i \mathit {dilog}\left (\frac {i-\tan \left (x \right )}{\sqrt {3}+i}\right )}{2}+\frac {i \mathit {dilog}\left (\frac {i+\tan \left (x \right )}{i-\sqrt {3}}\right )}{2}\) | \(96\) |
risch | \(-i \ln \left ({\mathrm e}^{i x}\right ) \ln \left (1-i {\mathrm e}^{i x}\right )+i \mathit {dilog}\left (\frac {-i \sqrt {3}+2 \,{\mathrm e}^{i x}+1}{1-i \sqrt {3}}\right )+i \ln \left ({\mathrm e}^{i x}\right ) \ln \left ({\mathrm e}^{2 i x}+1\right )+\frac {i \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i x}+1}\right ) {\mathrm {csgn}\left (\frac {i \left (-i {\mathrm e}^{2 i x}+\sqrt {3}\, {\mathrm e}^{2 i x}+i+\sqrt {3}\right )}{{\mathrm e}^{2 i x}+1}\right )}^{2} x}{2}-\ln \left (\frac {-2 \,{\mathrm e}^{i x}-i \sqrt {3}+1}{1-i \sqrt {3}}\right ) x -x \ln \left (\frac {-i \sqrt {3}+2 \,{\mathrm e}^{i x}+1}{1-i \sqrt {3}}\right )-i \mathit {dilog}\left (1+i {\mathrm e}^{i x}\right )-\frac {i \pi {\mathrm {csgn}\left (\frac {i \left (-i {\mathrm e}^{2 i x}+\sqrt {3}\, {\mathrm e}^{2 i x}+i+\sqrt {3}\right )}{{\mathrm e}^{2 i x}+1}\right )}^{3} x}{2}-i \mathit {dilog}\left (\frac {2 \,{\mathrm e}^{i x}}{1-i \sqrt {3}}\right )-i \ln \left ({\mathrm e}^{i x}\right ) \ln \left (1+i {\mathrm e}^{i x}\right )+x \ln \left (-i {\mathrm e}^{2 i x}+\sqrt {3}\, {\mathrm e}^{2 i x}+i+\sqrt {3}\right )-\frac {i \pi \,\mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i x}+1}\right ) \mathrm {csgn}\left (i \left (-i {\mathrm e}^{2 i x}+\sqrt {3}\, {\mathrm e}^{2 i x}+i+\sqrt {3}\right )\right ) \mathrm {csgn}\left (\frac {i \left (-i {\mathrm e}^{2 i x}+\sqrt {3}\, {\mathrm e}^{2 i x}+i+\sqrt {3}\right )}{{\mathrm e}^{2 i x}+1}\right ) x}{2}-i \mathit {dilog}\left (1-i {\mathrm e}^{i x}\right )+\frac {i \pi \,\mathrm {csgn}\left (i \left (-i {\mathrm e}^{2 i x}+\sqrt {3}\, {\mathrm e}^{2 i x}+i+\sqrt {3}\right )\right ) {\mathrm {csgn}\left (\frac {i \left (-i {\mathrm e}^{2 i x}+\sqrt {3}\, {\mathrm e}^{2 i x}+i+\sqrt {3}\right )}{{\mathrm e}^{2 i x}+1}\right )}^{2} x}{2}-i \ln \left (\frac {-2 \,{\mathrm e}^{i x}-i \sqrt {3}+1}{1-i \sqrt {3}}\right ) \ln \left (\frac {2 \,{\mathrm e}^{i x}}{1-i \sqrt {3}}\right )\) | \(522\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.58, size = 115, normalized size = 1.06 \begin {gather*} \frac {1}{2} \, \arctan \left (\frac {1}{4} \, \sqrt {3} + \frac {1}{4} \, \tan \left (x\right ), \frac {1}{4} \, \sqrt {3} \tan \left (x\right ) + \frac {3}{4}\right ) \log \left (\tan \left (x\right )^{2} + 1\right ) - \frac {1}{2} \, x \log \left (\frac {1}{4} \, \tan \left (x\right )^{2} + \frac {1}{2} \, \sqrt {3} \tan \left (x\right ) + \frac {3}{4}\right ) + x \log \left (\sqrt {3} + \tan \left (x\right )\right ) + \frac {1}{2} i \, {\rm Li}_2\left (-\frac {{\left (\sqrt {3} + i\right )} \tan \left (x\right ) - i \, \sqrt {3} + 1}{2 i \, \sqrt {3} + 2}\right ) - \frac {1}{2} i \, {\rm Li}_2\left (\frac {{\left (\sqrt {3} - i\right )} \tan \left (x\right ) + i \, \sqrt {3} + 1}{2 i \, \sqrt {3} - 2}\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. 262 vs. \(2 (75) = 150\).
time = 0.72, size = 262, normalized size = 2.43 \begin {gather*} x \log \left (\sqrt {3} + \tan \left (x\right )\right ) - \frac {1}{2} \, x \log \left (\frac {{\left (i \, \sqrt {3} + 1\right )} \tan \left (x\right )^{2} + 2 \, {\left (\sqrt {3} + i\right )} \tan \left (x\right ) - i \, \sqrt {3} + 3}{2 \, {\left (\tan \left (x\right )^{2} + 1\right )}}\right ) - \frac {1}{2} \, x \log \left (\frac {{\left (-i \, \sqrt {3} + 1\right )} \tan \left (x\right )^{2} + 2 \, {\left (\sqrt {3} - i\right )} \tan \left (x\right ) + i \, \sqrt {3} + 3}{2 \, {\left (\tan \left (x\right )^{2} + 1\right )}}\right ) + \frac {1}{2} \, x \log \left (-\frac {2 \, {\left (i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1}\right ) + \frac {1}{2} \, x \log \left (-\frac {2 \, {\left (-i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1}\right ) + \frac {1}{4} i \, {\rm Li}_2\left (-\frac {{\left (i \, \sqrt {3} + 1\right )} \tan \left (x\right )^{2} + 2 \, {\left (\sqrt {3} + i\right )} \tan \left (x\right ) - i \, \sqrt {3} + 3}{2 \, {\left (\tan \left (x\right )^{2} + 1\right )}} + 1\right ) - \frac {1}{4} i \, {\rm Li}_2\left (-\frac {{\left (-i \, \sqrt {3} + 1\right )} \tan \left (x\right )^{2} + 2 \, {\left (\sqrt {3} - i\right )} \tan \left (x\right ) + i \, \sqrt {3} + 3}{2 \, {\left (\tan \left (x\right )^{2} + 1\right )}} + 1\right ) + \frac {1}{4} i \, {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1} + 1\right ) - \frac {1}{4} i \, {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (x\right ) - 1\right )}}{\tan \left (x\right )^{2} + 1} + 1\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 (\tan {\left (x \right )} + \sqrt {3} \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.01 \begin {gather*} \int \ln \left (\mathrm {tan}\left (x\right )+\sqrt {3}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Chatgpt [F] Failed to verify
time = 1.00, size = 40, normalized size = 0.37 \begin {gather*} x \ln \left (\sqrt {3}+\tan \left (x \right )\right )-\frac {\left (1+\sqrt {3}\right ) \ln \left (\sqrt {3}+\tan \left (x \right )-1\right )}{2}+\frac {\left (\sqrt {3}-1\right ) \ln \left (\sqrt {3}+\tan \left (x \right )+1\right )}{2} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________