Integrand size = 16, antiderivative size = 62 \[ \int \frac {1}{b x+c x^2+d x^3} \, dx=\frac {c \text {arctanh}\left (\frac {c+2 d x}{\sqrt {c^2-4 b d}}\right )}{b \sqrt {c^2-4 b d}}+\frac {\log (x)}{b}-\frac {\log \left (b+c x+d x^2\right )}{2 b} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {1608, 719, 29, 648, 632, 212, 642} \[ \int \frac {1}{b x+c x^2+d x^3} \, dx=\frac {c \text {arctanh}\left (\frac {c+2 d x}{\sqrt {c^2-4 b d}}\right )}{b \sqrt {c^2-4 b d}}-\frac {\log \left (b+c x+d x^2\right )}{2 b}+\frac {\log (x)}{b} \]
[In]
[Out]
Rule 29
Rule 212
Rule 632
Rule 642
Rule 648
Rule 719
Rule 1608
Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{x \left (b+c x+d x^2\right )} \, dx \\ & = \frac {\int \frac {1}{x} \, dx}{b}+\frac {\int \frac {-c-d x}{b+c x+d x^2} \, dx}{b} \\ & = \frac {\log (x)}{b}-\frac {\int \frac {c+2 d x}{b+c x+d x^2} \, dx}{2 b}-\frac {c \int \frac {1}{b+c x+d x^2} \, dx}{2 b} \\ & = \frac {\log (x)}{b}-\frac {\log \left (b+c x+d x^2\right )}{2 b}+\frac {c \text {Subst}\left (\int \frac {1}{c^2-4 b d-x^2} \, dx,x,c+2 d x\right )}{b} \\ & = \frac {c \tanh ^{-1}\left (\frac {c+2 d x}{\sqrt {c^2-4 b d}}\right )}{b \sqrt {c^2-4 b d}}+\frac {\log (x)}{b}-\frac {\log \left (b+c x+d x^2\right )}{2 b} \\ \end{align*}
Time = 0.05 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.98 \[ \int \frac {1}{b x+c x^2+d x^3} \, dx=-\frac {\frac {2 c \arctan \left (\frac {c+2 d x}{\sqrt {-c^2+4 b d}}\right )}{\sqrt {-c^2+4 b d}}-2 \log (x)+\log (b+x (c+d x))}{2 b} \]
[In]
[Out]
Time = 0.09 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.98
method | result | size |
default | \(\frac {\ln \left (x \right )}{b}+\frac {-\frac {\ln \left (d \,x^{2}+c x +b \right )}{2}-\frac {c \arctan \left (\frac {2 d x +c}{\sqrt {4 b d -c^{2}}}\right )}{\sqrt {4 b d -c^{2}}}}{b}\) | \(61\) |
risch | \(-\frac {2 \ln \left (\left (8 b \,c^{2} d -2 c^{4}+6 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b d -2 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, c^{2}\right ) x +12 b^{2} c d -3 b \,c^{3}-\sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b c \right ) d}{4 b d -c^{2}}+\frac {\ln \left (\left (8 b \,c^{2} d -2 c^{4}+6 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b d -2 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, c^{2}\right ) x +12 b^{2} c d -3 b \,c^{3}-\sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b c \right ) c^{2}}{2 b \left (4 b d -c^{2}\right )}+\frac {\ln \left (\left (8 b \,c^{2} d -2 c^{4}+6 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b d -2 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, c^{2}\right ) x +12 b^{2} c d -3 b \,c^{3}-\sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b c \right ) \sqrt {-c^{2} \left (4 b d -c^{2}\right )}}{2 b \left (4 b d -c^{2}\right )}-\frac {2 \ln \left (\left (8 b \,c^{2} d -2 c^{4}-6 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b d +2 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, c^{2}\right ) x +12 b^{2} c d -3 b \,c^{3}+\sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b c \right ) d}{4 b d -c^{2}}+\frac {\ln \left (\left (8 b \,c^{2} d -2 c^{4}-6 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b d +2 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, c^{2}\right ) x +12 b^{2} c d -3 b \,c^{3}+\sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b c \right ) c^{2}}{2 b \left (4 b d -c^{2}\right )}-\frac {\ln \left (\left (8 b \,c^{2} d -2 c^{4}-6 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b d +2 \sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, c^{2}\right ) x +12 b^{2} c d -3 b \,c^{3}+\sqrt {-c^{2} \left (4 b d -c^{2}\right )}\, b c \right ) \sqrt {-c^{2} \left (4 b d -c^{2}\right )}}{2 b \left (4 b d -c^{2}\right )}+\frac {\ln \left (x \right )}{b}\) | \(707\) |
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 211, normalized size of antiderivative = 3.40 \[ \int \frac {1}{b x+c x^2+d x^3} \, dx=\left [\frac {\sqrt {c^{2} - 4 \, b d} c \log \left (\frac {2 \, d^{2} x^{2} + 2 \, c d x + c^{2} - 2 \, b d + \sqrt {c^{2} - 4 \, b d} {\left (2 \, d x + c\right )}}{d x^{2} + c x + b}\right ) - {\left (c^{2} - 4 \, b d\right )} \log \left (d x^{2} + c x + b\right ) + 2 \, {\left (c^{2} - 4 \, b d\right )} \log \left (x\right )}{2 \, {\left (b c^{2} - 4 \, b^{2} d\right )}}, \frac {2 \, \sqrt {-c^{2} + 4 \, b d} c \arctan \left (-\frac {\sqrt {-c^{2} + 4 \, b d} {\left (2 \, d x + c\right )}}{c^{2} - 4 \, b d}\right ) - {\left (c^{2} - 4 \, b d\right )} \log \left (d x^{2} + c x + b\right ) + 2 \, {\left (c^{2} - 4 \, b d\right )} \log \left (x\right )}{2 \, {\left (b c^{2} - 4 \, b^{2} d\right )}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 564 vs. \(2 (54) = 108\).
Time = 4.40 (sec) , antiderivative size = 564, normalized size of antiderivative = 9.10 \[ \int \frac {1}{b x+c x^2+d x^3} \, dx=\left (- \frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right ) \log {\left (x + \frac {24 b^{4} d^{2} \left (- \frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right )^{2} - 14 b^{3} c^{2} d \left (- \frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right )^{2} - 12 b^{3} d^{2} \left (- \frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right ) + 2 b^{2} c^{4} \left (- \frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right )^{2} + 3 b^{2} c^{2} d \left (- \frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right ) - 12 b^{2} d^{2} + 11 b c^{2} d - 2 c^{4}}{9 b c d^{2} - 2 c^{3} d} \right )} + \left (\frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right ) \log {\left (x + \frac {24 b^{4} d^{2} \left (\frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right )^{2} - 14 b^{3} c^{2} d \left (\frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right )^{2} - 12 b^{3} d^{2} \left (\frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right ) + 2 b^{2} c^{4} \left (\frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right )^{2} + 3 b^{2} c^{2} d \left (\frac {c \sqrt {- 4 b d + c^{2}}}{2 b \left (4 b d - c^{2}\right )} - \frac {1}{2 b}\right ) - 12 b^{2} d^{2} + 11 b c^{2} d - 2 c^{4}}{9 b c d^{2} - 2 c^{3} d} \right )} + \frac {\log {\left (x \right )}}{b} \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{b x+c x^2+d x^3} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00 \[ \int \frac {1}{b x+c x^2+d x^3} \, dx=-\frac {c \arctan \left (\frac {2 \, d x + c}{\sqrt {-c^{2} + 4 \, b d}}\right )}{\sqrt {-c^{2} + 4 \, b d} b} - \frac {\log \left (d x^{2} + c x + b\right )}{2 \, b} + \frac {\log \left ({\left | x \right |}\right )}{b} \]
[In]
[Out]
Time = 0.28 (sec) , antiderivative size = 213, normalized size of antiderivative = 3.44 \[ \int \frac {1}{b x+c x^2+d x^3} \, dx=\frac {\ln \left (x\right )}{b}-\ln \left (\left (x\,\left (6\,b\,d^2-2\,c^2\,d\right )-b\,c\,d\right )\,\left (\frac {1}{2\,b}-\frac {c\,\sqrt {c^2-4\,b\,d}}{2\,\left (b\,c^2-4\,b^2\,d\right )}\right )-c\,d-3\,d^2\,x\right )\,\left (\frac {1}{2\,b}-\frac {c\,\sqrt {c^2-4\,b\,d}}{2\,\left (b\,c^2-4\,b^2\,d\right )}\right )-\ln \left (\left (x\,\left (6\,b\,d^2-2\,c^2\,d\right )-b\,c\,d\right )\,\left (\frac {1}{2\,b}+\frac {c\,\sqrt {c^2-4\,b\,d}}{2\,\left (b\,c^2-4\,b^2\,d\right )}\right )-c\,d-3\,d^2\,x\right )\,\left (\frac {1}{2\,b}+\frac {c\,\sqrt {c^2-4\,b\,d}}{2\,\left (b\,c^2-4\,b^2\,d\right )}\right ) \]
[In]
[Out]