Optimal. Leaf size=367 \[ \frac {\cot ^{-1}(d+e x) \log \left (\frac {2 e \left (b-\sqrt {b^2-4 a c}+2 c x\right )}{\left (2 c (i-d)+\left (b-\sqrt {b^2-4 a c}\right ) e\right ) (1-i (d+e x))}\right )}{\sqrt {b^2-4 a c}}-\frac {\cot ^{-1}(d+e x) \log \left (\frac {2 e \left (b+\sqrt {b^2-4 a c}+2 c x\right )}{\left (2 c (i-d)+\left (b+\sqrt {b^2-4 a c}\right ) e\right ) (1-i (d+e x))}\right )}{\sqrt {b^2-4 a c}}+\frac {i \text {PolyLog}\left (2,1+\frac {2 \left (2 c d-\left (b-\sqrt {b^2-4 a c}\right ) e-2 c (d+e x)\right )}{\left (2 i c-2 c d+b e-\sqrt {b^2-4 a c} e\right ) (1-i (d+e x))}\right )}{2 \sqrt {b^2-4 a c}}-\frac {i \text {PolyLog}\left (2,1+\frac {2 \left (2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e-2 c (d+e x)\right )}{\left (2 c (i-d)+\left (b+\sqrt {b^2-4 a c}\right ) e\right ) (1-i (d+e x))}\right )}{2 \sqrt {b^2-4 a c}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.52, antiderivative size = 367, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 8, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.421, Rules used = {632, 212,
6860, 5156, 4967, 2449, 2352, 2497} \begin {gather*} \frac {i \text {Li}_2\left (\frac {2 \left (2 c d-\left (b-\sqrt {b^2-4 a c}\right ) e-2 c (d+e x)\right )}{\left (-2 d c+2 i c+b e-\sqrt {b^2-4 a c} e\right ) (1-i (d+e x))}+1\right )}{2 \sqrt {b^2-4 a c}}-\frac {i \text {Li}_2\left (\frac {2 \left (2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e-2 c (d+e x)\right )}{\left (2 c (i-d)+\left (b+\sqrt {b^2-4 a c}\right ) e\right ) (1-i (d+e x))}+1\right )}{2 \sqrt {b^2-4 a c}}+\frac {\cot ^{-1}(d+e x) \log \left (\frac {2 e \left (-\sqrt {b^2-4 a c}+b+2 c x\right )}{(1-i (d+e x)) \left (e \left (b-\sqrt {b^2-4 a c}\right )+2 c (-d+i)\right )}\right )}{\sqrt {b^2-4 a c}}-\frac {\cot ^{-1}(d+e x) \log \left (\frac {2 e \left (\sqrt {b^2-4 a c}+b+2 c x\right )}{(1-i (d+e x)) \left (e \left (\sqrt {b^2-4 a c}+b\right )+2 c (-d+i)\right )}\right )}{\sqrt {b^2-4 a c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 2352
Rule 2449
Rule 2497
Rule 4967
Rule 5156
Rule 6860
Rubi steps
\begin {align*} \int \frac {\cot ^{-1}(d+e x)}{a+b x+c x^2} \, dx &=\int \left (\frac {2 c \cot ^{-1}(d+e x)}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}+2 c x\right )}-\frac {2 c \cot ^{-1}(d+e x)}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}+2 c x\right )}\right ) \, dx\\ &=\frac {(2 c) \int \frac {\cot ^{-1}(d+e x)}{b-\sqrt {b^2-4 a c}+2 c x} \, dx}{\sqrt {b^2-4 a c}}-\frac {(2 c) \int \frac {\cot ^{-1}(d+e x)}{b+\sqrt {b^2-4 a c}+2 c x} \, dx}{\sqrt {b^2-4 a c}}\\ &=\frac {(2 c) \text {Subst}\left (\int \frac {\cot ^{-1}(x)}{\frac {-2 c d+\left (b-\sqrt {b^2-4 a c}\right ) e}{e}+\frac {2 c x}{e}} \, dx,x,d+e x\right )}{\sqrt {b^2-4 a c} e}-\frac {(2 c) \text {Subst}\left (\int \frac {\cot ^{-1}(x)}{\frac {-2 c d+\left (b+\sqrt {b^2-4 a c}\right ) e}{e}+\frac {2 c x}{e}} \, dx,x,d+e x\right )}{\sqrt {b^2-4 a c} e}\\ &=\frac {\cot ^{-1}(d+e x) \log \left (\frac {2 e \left (b-\sqrt {b^2-4 a c}+2 c x\right )}{\left (2 i c-2 c d+b e-\sqrt {b^2-4 a c} e\right ) (1-i (d+e x))}\right )}{\sqrt {b^2-4 a c}}-\frac {\cot ^{-1}(d+e x) \log \left (\frac {2 e \left (b+\sqrt {b^2-4 a c}+2 c x\right )}{\left (2 c (i-d)+\left (b+\sqrt {b^2-4 a c}\right ) e\right ) (1-i (d+e x))}\right )}{\sqrt {b^2-4 a c}}+\frac {\text {Subst}\left (\int \frac {\log \left (\frac {2 \left (\frac {-2 c d+\left (b-\sqrt {b^2-4 a c}\right ) e}{e}+\frac {2 c x}{e}\right )}{\left (\frac {2 i c}{e}+\frac {-2 c d+\left (b-\sqrt {b^2-4 a c}\right ) e}{e}\right ) (1-i x)}\right )}{1+x^2} \, dx,x,d+e x\right )}{\sqrt {b^2-4 a c}}-\frac {\text {Subst}\left (\int \frac {\log \left (\frac {2 \left (\frac {-2 c d+\left (b+\sqrt {b^2-4 a c}\right ) e}{e}+\frac {2 c x}{e}\right )}{\left (\frac {2 i c}{e}+\frac {-2 c d+\left (b+\sqrt {b^2-4 a c}\right ) e}{e}\right ) (1-i x)}\right )}{1+x^2} \, dx,x,d+e x\right )}{\sqrt {b^2-4 a c}}\\ &=\frac {\cot ^{-1}(d+e x) \log \left (\frac {2 e \left (b-\sqrt {b^2-4 a c}+2 c x\right )}{\left (2 i c-2 c d+b e-\sqrt {b^2-4 a c} e\right ) (1-i (d+e x))}\right )}{\sqrt {b^2-4 a c}}-\frac {\cot ^{-1}(d+e x) \log \left (\frac {2 e \left (b+\sqrt {b^2-4 a c}+2 c x\right )}{\left (2 c (i-d)+\left (b+\sqrt {b^2-4 a c}\right ) e\right ) (1-i (d+e x))}\right )}{\sqrt {b^2-4 a c}}+\frac {i \text {Li}_2\left (1-\frac {2 e \left (b-\sqrt {b^2-4 a c}+2 c x\right )}{\left (2 i c-2 c d+b e-\sqrt {b^2-4 a c} e\right ) (1-i (d+e x))}\right )}{2 \sqrt {b^2-4 a c}}-\frac {i \text {Li}_2\left (1-\frac {2 e \left (b+\sqrt {b^2-4 a c}+2 c x\right )}{\left (2 c (i-d)+\left (b+\sqrt {b^2-4 a c}\right ) e\right ) (1-i (d+e x))}\right )}{2 \sqrt {b^2-4 a c}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 180.02, size = 0, normalized size = 0.00 \begin {gather*} \text {\$Aborted} \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 4610 vs. \(2 (329 ) = 658\).
time = 1.00, size = 4611, normalized size = 12.56
method | result | size |
risch | \(-\frac {e \dilog \left (\frac {i b e -2 i c d -2 \left (-i e x -i d +1\right ) c +\sqrt {4 a c \,e^{2}-b^{2} e^{2}}+2 c}{i b e -2 i c d +2 c +\sqrt {4 a c \,e^{2}-b^{2} e^{2}}}\right )}{2 \sqrt {4 a c \,e^{2}-b^{2} e^{2}}}+\frac {e \dilog \left (\frac {i b e -2 i c d -2 \left (-i e x -i d +1\right ) c -\sqrt {4 a c \,e^{2}-b^{2} e^{2}}+2 c}{i b e -2 i c d +2 c -\sqrt {4 a c \,e^{2}-b^{2} e^{2}}}\right )}{2 \sqrt {4 a c \,e^{2}-b^{2} e^{2}}}-\frac {e \dilog \left (\frac {i b e -2 i c d +2 \left (i e x +i d +1\right ) c -\sqrt {4 a c \,e^{2}-b^{2} e^{2}}-2 c}{i b e -2 i c d -\sqrt {4 a c \,e^{2}-b^{2} e^{2}}-2 c}\right )}{2 \sqrt {4 a c \,e^{2}-b^{2} e^{2}}}+\frac {e \dilog \left (\frac {i b e -2 i c d +2 \left (i e x +i d +1\right ) c +\sqrt {4 a c \,e^{2}-b^{2} e^{2}}-2 c}{i b e -2 i c d +\sqrt {4 a c \,e^{2}-b^{2} e^{2}}-2 c}\right )}{2 \sqrt {4 a c \,e^{2}-b^{2} e^{2}}}+\frac {e \ln \left (i e x +i d +1\right ) \ln \left (\frac {i b e -2 i c d +2 \left (i e x +i d +1\right ) c +\sqrt {4 a c \,e^{2}-b^{2} e^{2}}-2 c}{i b e -2 i c d +\sqrt {4 a c \,e^{2}-b^{2} e^{2}}-2 c}\right )}{2 \sqrt {4 a c \,e^{2}-b^{2} e^{2}}}-\frac {e \ln \left (i e x +i d +1\right ) \ln \left (\frac {i b e -2 i c d +2 \left (i e x +i d +1\right ) c -\sqrt {4 a c \,e^{2}-b^{2} e^{2}}-2 c}{i b e -2 i c d -\sqrt {4 a c \,e^{2}-b^{2} e^{2}}-2 c}\right )}{2 \sqrt {4 a c \,e^{2}-b^{2} e^{2}}}-\frac {e \ln \left (-i e x -i d +1\right ) \ln \left (\frac {i b e -2 i c d -2 \left (-i e x -i d +1\right ) c +\sqrt {4 a c \,e^{2}-b^{2} e^{2}}+2 c}{i b e -2 i c d +2 c +\sqrt {4 a c \,e^{2}-b^{2} e^{2}}}\right )}{2 \sqrt {4 a c \,e^{2}-b^{2} e^{2}}}+\frac {e \ln \left (-i e x -i d +1\right ) \ln \left (\frac {i b e -2 i c d -2 \left (-i e x -i d +1\right ) c -\sqrt {4 a c \,e^{2}-b^{2} e^{2}}+2 c}{i b e -2 i c d +2 c -\sqrt {4 a c \,e^{2}-b^{2} e^{2}}}\right )}{2 \sqrt {4 a c \,e^{2}-b^{2} e^{2}}}+\frac {i e \pi \arctan \left (\frac {i b e -2 i c d -2 \left (-i e x -i d +1\right ) c +2 c}{\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}\right )}{\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}\) | \(959\) |
derivativedivides | \(\text {Expression too large to display}\) | \(4611\) |
default | \(\text {Expression too large to display}\) | \(4611\) |
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 [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]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\mathrm {acot}\left (d+e\,x\right )}{c\,x^2+b\,x+a} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________