Integrand size = 9, antiderivative size = 108 \[ \int \log \left (\sqrt {3}+\tan (x)\right ) \, dx=-\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 ) \] Output:
-1/2*I*((ln((I-tan(x))/(3^(1/2)+I))-ln((I+tan(x))/(I-3^(1/2))))*ln(3^(1/2) +tan(x))-polylog(2,(3^(1/2)+tan(x))/(-I+3^(1/2)))+polylog(2,(3^(1/2)+tan(x ))/(3^(1/2)+I)))
Time = 0.04 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.22 \[ \int \log \left (\sqrt {3}+\tan (x)\right ) \, dx=-\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 ) \] Input:
Integrate[Log[Sqrt[3] + Tan[x]],x]
Output:
(-1/2*I)*Log[(I - Tan[x])/(I + Sqrt[3])]*Log[Sqrt[3] + Tan[x]] + (I/2)*Log [(I + Tan[x])/(I - Sqrt[3])]*Log[Sqrt[3] + Tan[x]] + (I/2)*PolyLog[2, -((S qrt[3] + Tan[x])/(I - Sqrt[3]))] - (I/2)*PolyLog[2, (Sqrt[3] + Tan[x])/(I + Sqrt[3])]
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \log \left (\tan (x)+\sqrt {3}\right ) \, dx\) |
\(\Big \downarrow \) 3028 |
\(\displaystyle x \log \left (\tan (x)+\sqrt {3}\right )-\int \frac {x \sec ^2(x)}{\tan (x)+\sqrt {3}}dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle x \log \left (\tan (x)+\sqrt {3}\right )-\int \frac {x \sec ^2(x)}{\tan (x)+\sqrt {3}}dx\) |
Input:
Int[Log[Sqrt[3] + Tan[x]],x]
Output:
$Aborted
Time = 0.54 (sec) , antiderivative size = 96, normalized size of antiderivative = 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 \operatorname {dilog}\left (\frac {i-\tan \left (x \right )}{\sqrt {3}+i}\right )}{2}+\frac {i \operatorname {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 \operatorname {dilog}\left (\frac {i-\tan \left (x \right )}{\sqrt {3}+i}\right )}{2}+\frac {i \operatorname {dilog}\left (\frac {-i-\tan \left (x \right )}{-i+\sqrt {3}}\right )}{2}\) | \(96\) |
risch | \(\frac {i \pi \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i x}+1}\right ) {\operatorname {csgn}\left (\frac {i \left (\sqrt {3}\, {\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}+\sqrt {3}+i\right )}{{\mathrm e}^{2 i x}+1}\right )}^{2} x}{2}+x \ln \left (\sqrt {3}\, {\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}+\sqrt {3}+i\right )+i \ln \left ({\mathrm e}^{i x}\right ) \ln \left ({\mathrm e}^{2 i x}+1\right )-\frac {i \pi \,\operatorname {csgn}\left (\frac {i}{{\mathrm e}^{2 i x}+1}\right ) \operatorname {csgn}\left (i \left (\sqrt {3}\, {\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}+\sqrt {3}+i\right )\right ) \operatorname {csgn}\left (\frac {i \left (\sqrt {3}\, {\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}+\sqrt {3}+i\right )}{{\mathrm e}^{2 i x}+1}\right ) x}{2}-\frac {i \pi {\operatorname {csgn}\left (\frac {i \left (\sqrt {3}\, {\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}+\sqrt {3}+i\right )}{{\mathrm e}^{2 i x}+1}\right )}^{3} x}{2}-i \operatorname {dilog}\left (1-i {\mathrm e}^{i x}\right )-\ln \left (\frac {-2 \,{\mathrm e}^{i x}-i \sqrt {3}+1}{1-i \sqrt {3}}\right ) x -i \operatorname {dilog}\left (\frac {2 \,{\mathrm e}^{i x}}{1-i \sqrt {3}}\right )+i \operatorname {dilog}\left (\frac {-i \sqrt {3}+2 \,{\mathrm e}^{i x}+1}{1-i \sqrt {3}}\right )+\frac {i \pi \,\operatorname {csgn}\left (i \left (\sqrt {3}\, {\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}+\sqrt {3}+i\right )\right ) {\operatorname {csgn}\left (\frac {i \left (\sqrt {3}\, {\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}+\sqrt {3}+i\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 )-i \ln \left ({\mathrm e}^{i x}\right ) \ln \left (1+i {\mathrm e}^{i x}\right )-x \ln \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 (1-i {\mathrm e}^{i x}\right )-i \operatorname {dilog}\left (1+i {\mathrm e}^{i x}\right )\) | \(522\) |
Input:
int(ln(3^(1/2)+tan(x)),x,method=_RETURNVERBOSE)
Output:
-1/2*I*ln(3^(1/2)+tan(x))*ln((I-tan(x))/(3^(1/2)+I))+1/2*I*ln(3^(1/2)+tan( x))*ln((-I-tan(x))/(-I+3^(1/2)))-1/2*I*dilog((I-tan(x))/(3^(1/2)+I))+1/2*I *dilog((-I-tan(x))/(-I+3^(1/2)))
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.12 (sec) , antiderivative size = 262, normalized size of antiderivative = 2.43 \[ \int \log \left (\sqrt {3}+\tan (x)\right ) \, dx=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 ) \] Input:
integrate(log(3^(1/2)+tan(x)),x, algorithm="fricas")
Output:
x*log(sqrt(3) + tan(x)) - 1/2*x*log(1/2*((I*sqrt(3) + 1)*tan(x)^2 + 2*(sqr t(3) + I)*tan(x) - I*sqrt(3) + 3)/(tan(x)^2 + 1)) - 1/2*x*log(1/2*((-I*sqr t(3) + 1)*tan(x)^2 + 2*(sqrt(3) - I)*tan(x) + I*sqrt(3) + 3)/(tan(x)^2 + 1 )) + 1/2*x*log(-2*(I*tan(x) - 1)/(tan(x)^2 + 1)) + 1/2*x*log(-2*(-I*tan(x) - 1)/(tan(x)^2 + 1)) + 1/4*I*dilog(-1/2*((I*sqrt(3) + 1)*tan(x)^2 + 2*(sq rt(3) + I)*tan(x) - I*sqrt(3) + 3)/(tan(x)^2 + 1) + 1) - 1/4*I*dilog(-1/2* ((-I*sqrt(3) + 1)*tan(x)^2 + 2*(sqrt(3) - I)*tan(x) + I*sqrt(3) + 3)/(tan( x)^2 + 1) + 1) + 1/4*I*dilog(2*(I*tan(x) - 1)/(tan(x)^2 + 1) + 1) - 1/4*I* dilog(2*(-I*tan(x) - 1)/(tan(x)^2 + 1) + 1)
\[ \int \log \left (\sqrt {3}+\tan (x)\right ) \, dx=\int \log {\left (\tan {\left (x \right )} + \sqrt {3} \right )}\, dx \] Input:
integrate(ln(3**(1/2)+tan(x)),x)
Output:
Integral(log(tan(x) + sqrt(3)), x)
Time = 0.16 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.06 \[ \int \log \left (\sqrt {3}+\tan (x)\right ) \, dx=\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 ) \] Input:
integrate(log(3^(1/2)+tan(x)),x, algorithm="maxima")
Output:
1/2*arctan2(1/4*sqrt(3) + 1/4*tan(x), 1/4*sqrt(3)*tan(x) + 3/4)*log(tan(x) ^2 + 1) - 1/2*x*log(1/4*tan(x)^2 + 1/2*sqrt(3)*tan(x) + 3/4) + x*log(sqrt( 3) + tan(x)) + 1/2*I*dilog(-((sqrt(3) + I)*tan(x) - I*sqrt(3) + 1)/(2*I*sq rt(3) + 2)) - 1/2*I*dilog(((sqrt(3) - I)*tan(x) + I*sqrt(3) + 1)/(2*I*sqrt (3) - 2))
\[ \int \log \left (\sqrt {3}+\tan (x)\right ) \, dx=\int { \log \left (\sqrt {3} + \tan \left (x\right )\right ) \,d x } \] Input:
integrate(log(3^(1/2)+tan(x)),x, algorithm="giac")
Output:
integrate(log(sqrt(3) + tan(x)), x)
Timed out. \[ \int \log \left (\sqrt {3}+\tan (x)\right ) \, dx=\int \ln \left (\mathrm {tan}\left (x\right )+\sqrt {3}\right ) \,d x \] Input:
int(log(tan(x) + 3^(1/2)),x)
Output:
int(log(tan(x) + 3^(1/2)), x)
\[ \int \log \left (\sqrt {3}+\tan (x)\right ) \, dx=\int \mathrm {log}\left (\sqrt {3}+\tan \left (x \right )\right )d x \] Input:
int(log(3^(1/2)+tan(x)),x)
Output:
int(log(sqrt(3) + tan(x)),x)