Optimal. Leaf size=65 \[ -\frac {(\text {b1} c-b \text {c1}) \tanh ^{-1}\left (\frac {b+c x}{\sqrt {b^2-a c}}\right )}{c \sqrt {b^2-a c}}+\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {648, 632, 212,
642} \begin {gather*} \frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c}-\frac {(\text {b1} c-b \text {c1}) \tanh ^{-1}\left (\frac {b+c x}{\sqrt {b^2-a c}}\right )}{c \sqrt {b^2-a c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rubi steps
\begin {align*} \int \frac {\text {b1}+\text {c1} x}{a+2 b x+c x^2} \, dx &=\frac {\text {c1} \int \frac {2 b+2 c x}{a+2 b x+c x^2} \, dx}{2 c}+\frac {(2 \text {b1} c-2 b \text {c1}) \int \frac {1}{a+2 b x+c x^2} \, dx}{2 c}\\ &=\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c}-\frac {(2 \text {b1} c-2 b \text {c1}) \text {Subst}\left (\int \frac {1}{4 \left (b^2-a c\right )-x^2} \, dx,x,2 b+2 c x\right )}{c}\\ &=-\frac {(\text {b1} c-b \text {c1}) \tanh ^{-1}\left (\frac {b+c x}{\sqrt {b^2-a c}}\right )}{c \sqrt {b^2-a c}}+\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 66, normalized size = 1.02 \begin {gather*} \frac {(\text {b1} c-b \text {c1}) \tan ^{-1}\left (\frac {b+c x}{\sqrt {-b^2+a c}}\right )}{c \sqrt {-b^2+a c}}+\frac {\text {c1} \log \left (a+2 b x+c x^2\right )}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 63, normalized size = 0.97
method | result | size |
default | \(\frac {\mathit {c1} \ln \left (c \,x^{2}+2 b x +a \right )}{2 c}+\frac {\left (\mathit {b1} -\frac {\mathit {c1} b}{c}\right ) \arctan \left (\frac {2 c x +2 b}{2 \sqrt {a c -b^{2}}}\right )}{\sqrt {a c -b^{2}}}\) | \(63\) |
risch | \(\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) a \mathit {c1}}{2 a c -2 b^{2}}-\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) b^{2} \mathit {c1}}{2 c \left (a c -b^{2}\right )}+\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x -\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) \sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}}{2 c \left (a c -b^{2}\right )}+\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) a \mathit {c1}}{2 a c -2 b^{2}}-\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) b^{2} \mathit {c1}}{2 c \left (a c -b^{2}\right )}-\frac {\ln \left (-a b c \mathit {c1} +a \mathit {b1} \,c^{2}+b^{3} \mathit {c1} -b^{2} \mathit {b1} c +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, c x +\sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}\, b \right ) \sqrt {-\left (b \mathit {c1} -\mathit {b1} c \right )^{2} \left (a c -b^{2}\right )}}{2 c \left (a c -b^{2}\right )}\) | \(618\) |
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 = 0.42, size = 203, normalized size = 3.12 \begin {gather*} \left [\frac {{\left (b^{2} - a c\right )} c_{1} \log \left (c x^{2} + 2 \, b x + a\right ) - \sqrt {b^{2} - a c} {\left (b_{1} c - b c_{1}\right )} \log \left (\frac {c^{2} x^{2} + 2 \, b c x + 2 \, b^{2} - a c + 2 \, \sqrt {b^{2} - a c} {\left (c x + b\right )}}{c x^{2} + 2 \, b x + a}\right )}{2 \, {\left (b^{2} c - a c^{2}\right )}}, \frac {{\left (b^{2} - a c\right )} c_{1} \log \left (c x^{2} + 2 \, b x + a\right ) - 2 \, \sqrt {-b^{2} + a c} {\left (b_{1} c - b c_{1}\right )} \arctan \left (-\frac {\sqrt {-b^{2} + a c} {\left (c x + b\right )}}{b^{2} - a c}\right )}{2 \, {\left (b^{2} c - a c^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 246 vs.
\(2 (53) = 106\).
time = 0.40, size = 246, normalized size = 3.78 \begin {gather*} \left (\frac {c_{1}}{2 c} - \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) \log {\left (x + \frac {- 2 a c \left (\frac {c_{1}}{2 c} - \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) + a c_{1} + 2 b^{2} \left (\frac {c_{1}}{2 c} - \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) - b b_{1}}{b c_{1} - b_{1} c} \right )} + \left (\frac {c_{1}}{2 c} + \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) \log {\left (x + \frac {- 2 a c \left (\frac {c_{1}}{2 c} + \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) + a c_{1} + 2 b^{2} \left (\frac {c_{1}}{2 c} + \frac {\sqrt {- a c + b^{2}} \left (b c_{1} - b_{1} c\right )}{2 c \left (a c - b^{2}\right )}\right ) - b b_{1}}{b c_{1} - b_{1} c} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.48, size = 60, normalized size = 0.92 \begin {gather*} \frac {c_{1} \log \left (c x^{2} + 2 \, b x + a\right )}{2 \, c} + \frac {{\left (b_{1} c - b c_{1}\right )} \arctan \left (\frac {c x + b}{\sqrt {-b^{2} + a c}}\right )}{\sqrt {-b^{2} + a c} c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.27, size = 155, normalized size = 2.38 \begin {gather*} \frac {b_{1}\,\mathrm {atan}\left (\frac {b}{\sqrt {a\,c-b^2}}+\frac {c\,x}{\sqrt {a\,c-b^2}}\right )}{\sqrt {a\,c-b^2}}-\frac {2\,b^2\,c_{1}\,\ln \left (c\,x^2+2\,b\,x+a\right )}{4\,a\,c^2-4\,b^2\,c}+\frac {2\,a\,c\,c_{1}\,\ln \left (c\,x^2+2\,b\,x+a\right )}{4\,a\,c^2-4\,b^2\,c}-\frac {b\,c_{1}\,\mathrm {atan}\left (\frac {b}{\sqrt {a\,c-b^2}}+\frac {c\,x}{\sqrt {a\,c-b^2}}\right )}{c\,\sqrt {a\,c-b^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________