Optimal. Leaf size=85 \[ -\frac {b x^2}{2}+x \cot ^{-1}(c+(1-i c) \cot (a+b x))-\frac {1}{2} i x \log \left (1-i c e^{2 i a+2 i b x}\right )-\frac {\text {PolyLog}\left (2,i c e^{2 i a+2 i b x}\right )}{4 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {5274, 2215,
2221, 2317, 2438} \begin {gather*} -\frac {\text {Li}_2\left (i c e^{2 i a+2 i b x}\right )}{4 b}-\frac {1}{2} i x \log \left (1-i c e^{2 i a+2 i b x}\right )+x \cot ^{-1}(c+(1-i c) \cot (a+b x))-\frac {b x^2}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2215
Rule 2221
Rule 2317
Rule 2438
Rule 5274
Rubi steps
\begin {align*} \int \cot ^{-1}(c+(1-i c) \cot (a+b x)) \, dx &=x \cot ^{-1}(c+(1-i c) \cot (a+b x))+(i b) \int \frac {x}{-i (1-i c)+c-c e^{2 i a+2 i b x}} \, dx\\ &=-\frac {b x^2}{2}+x \cot ^{-1}(c+(1-i c) \cot (a+b x))-(b c) \int \frac {e^{2 i a+2 i b x} x}{-i (1-i c)+c-c e^{2 i a+2 i b x}} \, dx\\ &=-\frac {b x^2}{2}+x \cot ^{-1}(c+(1-i c) \cot (a+b x))-\frac {1}{2} i x \log \left (1-i c e^{2 i a+2 i b x}\right )+\frac {1}{2} i \int \log \left (1-\frac {c e^{2 i a+2 i b x}}{-i (1-i c)+c}\right ) \, dx\\ &=-\frac {b x^2}{2}+x \cot ^{-1}(c+(1-i c) \cot (a+b x))-\frac {1}{2} i x \log \left (1-i c e^{2 i a+2 i b x}\right )+\frac {\text {Subst}\left (\int \frac {\log \left (1-\frac {c x}{-i (1-i c)+c}\right )}{x} \, dx,x,e^{2 i a+2 i b x}\right )}{4 b}\\ &=-\frac {b x^2}{2}+x \cot ^{-1}(c+(1-i c) \cot (a+b x))-\frac {1}{2} i x \log \left (1-i c e^{2 i a+2 i b x}\right )-\frac {\text {Li}_2\left (i c e^{2 i a+2 i b x}\right )}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.44, size = 75, normalized size = 0.88 \begin {gather*} x \cot ^{-1}(c+(1-i c) \cot (a+b x))-\frac {1}{2} i x \log \left (1+\frac {i e^{-2 i (a+b x)}}{c}\right )+\frac {\text {PolyLog}\left (2,-\frac {i e^{-2 i (a+b x)}}{c}\right )}{4 b} \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. 1497 vs. \(2 (76 ) = 152\).
time = 0.85, size = 1498, normalized size = 17.62
method | result | size |
risch | \(\text {Expression too large to display}\) | \(1244\) |
default | \(\text {Expression too large to display}\) | \(1498\) |
derivativedivides | \(\text {Expression too large to display}\) | \(1673\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.02, size = 116, normalized size = 1.36 \begin {gather*} -\frac {2 \, b^{2} x^{2} - 4 \, \pi b x - 2 i \, b x \log \left (\frac {{\left (c e^{\left (2 i \, b x + 2 i \, a\right )} + i\right )} e^{\left (-2 i \, b x - 2 i \, a\right )}}{c + i}\right ) - 2 \, a^{2} + 2 \, {\left (i \, b x + i \, a\right )} \log \left (-i \, c e^{\left (2 i \, b x + 2 i \, a\right )} + 1\right ) - 2 i \, a \log \left (\frac {c e^{\left (2 i \, b x + 2 i \, a\right )} + i}{c}\right ) + {\rm Li}_2\left (i \, c e^{\left (2 i \, b x + 2 i \, a\right )}\right )}{4 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: CoercionFailed} \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 \Pi +\mathrm {acot}\left (c-\mathrm {cot}\left (a+b\,x\right )\,\left (-1+c\,1{}\mathrm {i}\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________