Optimal. Leaf size=343 \[ \frac {\text {RootSum}\left [\text {$\#$1}^4 b+4 \text {$\#$1}^2 a c-2 \text {$\#$1}^2 b c-4 \text {$\#$1} \sqrt {a} b c+b^2 c+b c^2\& ,\frac {\text {$\#$1}^2 b^3 \left (-\log \left (-\text {$\#$1}+\sqrt {a x^2+b x+c}-\sqrt {a} x\right )\right )-2 \text {$\#$1} a^{3/2} b^2 c \log \left (-\text {$\#$1}+\sqrt {a x^2+b x+c}-\sqrt {a} x\right )+2 \text {$\#$1} a^{5/2} c \log \left (-\text {$\#$1}+\sqrt {a x^2+b x+c}-\sqrt {a} x\right )-a^2 b c \log \left (-\text {$\#$1}+\sqrt {a x^2+b x+c}-\sqrt {a} x\right )+a b^3 c \log \left (-\text {$\#$1}+\sqrt {a x^2+b x+c}-\sqrt {a} x\right )+b^3 c \log \left (-\text {$\#$1}+\sqrt {a x^2+b x+c}-\sqrt {a} x\right )}{\text {$\#$1}^3 b+2 \text {$\#$1} a c-\text {$\#$1} b c-\sqrt {a} b c}\& \right ]}{2 b}-\frac {a^{3/2} \log \left (-2 \sqrt {a} \sqrt {a x^2+b x+c}+2 a x+b\right )}{b} \]
________________________________________________________________________________________
Rubi [B] time = 5.11, antiderivative size = 1002, normalized size of antiderivative = 2.92, number of steps used = 8, number of rules used = 6, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {1078, 621, 206, 1036, 1030, 205} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {b+2 a x}{2 \sqrt {a} \sqrt {a x^2+b x+c}}\right ) a^{3/2}}{b}+\frac {\sqrt {\sqrt {c} a^2+(1-b) b \sqrt {c} a-b \left (b \sqrt {c}-\sqrt {b^3+c b^2-2 a c b+a^2 c}\right )} \sqrt {b^4-a c b^3+\left (a^2 c-a \sqrt {c} \sqrt {b^3+c b^2-2 a c b+a^2 c}\right ) b^2+a^2 c b-a^3 c+a^2 \sqrt {c} \sqrt {b^3+c b^2-2 a c b+a^2 c}} \tan ^{-1}\left (\frac {b \sqrt {c} \left (\sqrt {c} a^2+(1-b) b \sqrt {c} a-b^2 \sqrt {c}+b \sqrt {b^3+c b^2-2 a c b+a^2 c}\right )-\left (b^4-a \left (a-b^2\right ) \left (a c-b c-\sqrt {b^3+c b^2-2 a c b+a^2 c} \sqrt {c}\right )\right ) x}{\sqrt {2} \sqrt [4]{c} \sqrt {b^4-a c b^3+a^2 c b^2+a^2 c b-a^3 c+a \left (a-b^2\right ) \sqrt {c} \sqrt {b^3+c b^2-2 a c b+a^2 c}} \sqrt {\sqrt {c} a^2+(1-b) b \sqrt {c} a-b \left (b \sqrt {c}-\sqrt {b^3+c b^2-2 a c b+a^2 c}\right )} \sqrt {a x^2+b x+c}}\right )}{\sqrt {2} b \sqrt [4]{c} \sqrt {b^3+c b^2-2 a c b+a^2 c}}-\frac {\sqrt {\sqrt {c} a^2+(1-b) b \sqrt {c} a-b \left (\sqrt {c} b+\sqrt {b^3+c b^2-2 a c b+a^2 c}\right )} \sqrt {b^4-a c b^3+\left (c a^2+\sqrt {c} \sqrt {b^3+c b^2-2 a c b+a^2 c} a\right ) b^2+a^2 c b-a^2 \sqrt {c} \left (\sqrt {c} a+\sqrt {b^3+c b^2-2 a c b+a^2 c}\right )} \tan ^{-1}\left (\frac {b \sqrt {c} \left (\sqrt {c} a^2+(1-b) b \sqrt {c} a-b \left (\sqrt {c} b+\sqrt {b^3+c b^2-2 a c b+a^2 c}\right )\right )-\left (b^4-a \left (a-b^2\right ) \left (a c-b c+\sqrt {b^3+c b^2-2 a c b+a^2 c} \sqrt {c}\right )\right ) x}{\sqrt {2} \sqrt [4]{c} \sqrt {b^4-a c b^3+a^2 c b^2+a^2 c b-a^3 c-a \left (a-b^2\right ) \sqrt {c} \sqrt {b^3+c b^2-2 a c b+a^2 c}} \sqrt {\sqrt {c} a^2+(1-b) b \sqrt {c} a-b \left (\sqrt {c} b+\sqrt {b^3+c b^2-2 a c b+a^2 c}\right )} \sqrt {a x^2+b x+c}}\right )}{\sqrt {2} b \sqrt [4]{c} \sqrt {b^3+c b^2-2 a c b+a^2 c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 206
Rule 621
Rule 1030
Rule 1036
Rule 1078
Rubi steps
\begin {align*} \int \frac {a b c-b^2 x+a^2 x^2}{\sqrt {c+b x+a x^2} \left (c+b x^2\right )} \, dx &=\frac {\int \frac {-a^2 c+a b^2 c-b^3 x}{\sqrt {c+b x+a x^2} \left (c+b x^2\right )} \, dx}{b}+\frac {a^2 \int \frac {1}{\sqrt {c+b x+a x^2}} \, dx}{b}\\ &=\frac {\left (2 a^2\right ) \operatorname {Subst}\left (\int \frac {1}{4 a-x^2} \, dx,x,\frac {b+2 a x}{\sqrt {c+b x+a x^2}}\right )}{b}+\frac {\int \frac {c \left (b^4-a \left (a-b^2\right ) \left (a c-b c+\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right )+b^2 \sqrt {c} \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b^2 \sqrt {c}-b \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right ) x}{\sqrt {c+b x+a x^2} \left (c+b x^2\right )} \, dx}{2 b \sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}}-\frac {\int \frac {c \left (b^4-a \left (a-b^2\right ) \left (a c-b c-\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right )+b^2 \sqrt {c} \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b^2 \sqrt {c}+b \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right ) x}{\sqrt {c+b x+a x^2} \left (c+b x^2\right )} \, dx}{2 b \sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}}\\ &=\frac {a^{3/2} \tanh ^{-1}\left (\frac {b+2 a x}{2 \sqrt {a} \sqrt {c+b x+a x^2}}\right )}{b}+\frac {\left (b c^2 \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}-\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right ) \left (b^4-a \left (a-b^2\right ) \left (a c-b c-\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right )\right ) \operatorname {Subst}\left (\int \frac {1}{2 b^3 c^{7/2} \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}-\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right ) \left (b^4-a \left (a-b^2\right ) \left (a c-b c-\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right )+b c x^2} \, dx,x,\frac {b^2 c^{3/2} \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b^2 \sqrt {c}+b \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )-b c \left (b^4-a \left (a-b^2\right ) \left (a c-b c-\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right ) x}{\sqrt {c+b x+a x^2}}\right )}{\sqrt {b^3+a^2 c-2 a b c+b^2 c}}-\frac {\left (b c^2 \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}+\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right ) \left (b^4-a \left (a-b^2\right ) \left (a c-b c+\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right )\right ) \operatorname {Subst}\left (\int \frac {1}{2 b^3 c^{7/2} \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}+\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right ) \left (b^4-a \left (a-b^2\right ) \left (a c-b c+\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right )+b c x^2} \, dx,x,\frac {b^2 c^{3/2} \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}+\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right )-b c \left (b^4-a \left (a-b^2\right ) \left (a c-b c+\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right ) x}{\sqrt {c+b x+a x^2}}\right )}{\sqrt {b^3+a^2 c-2 a b c+b^2 c}}\\ &=\frac {\sqrt {a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}-\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )} \sqrt {b^4-a^3 c+a^2 b c-a b^3 c+a^2 \sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}+b^2 \left (a^2 c-a \sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )} \tan ^{-1}\left (\frac {b \sqrt {c} \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b^2 \sqrt {c}+b \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )-\left (b^4-a \left (a-b^2\right ) \left (a c-b c-\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right ) x}{\sqrt {2} \sqrt [4]{c} \sqrt {b^4-a^3 c+a^2 b c+a^2 b^2 c-a b^3 c+a \left (a-b^2\right ) \sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}} \sqrt {a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}-\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )} \sqrt {c+b x+a x^2}}\right )}{\sqrt {2} b \sqrt [4]{c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}}-\frac {\sqrt {a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}+\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )} \sqrt {b^4+a^2 b c-a b^3 c-a^2 \sqrt {c} \left (a \sqrt {c}+\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )+b^2 \left (a^2 c+a \sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )} \tan ^{-1}\left (\frac {b \sqrt {c} \left (a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}+\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right )-\left (b^4-a \left (a-b^2\right ) \left (a c-b c+\sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )\right ) x}{\sqrt {2} \sqrt [4]{c} \sqrt {b^4-a^3 c+a^2 b c+a^2 b^2 c-a b^3 c-a \left (a-b^2\right ) \sqrt {c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}} \sqrt {a^2 \sqrt {c}+a (1-b) b \sqrt {c}-b \left (b \sqrt {c}+\sqrt {b^3+a^2 c-2 a b c+b^2 c}\right )} \sqrt {c+b x+a x^2}}\right )}{\sqrt {2} b \sqrt [4]{c} \sqrt {b^3+a^2 c-2 a b c+b^2 c}}+\frac {a^{3/2} \tanh ^{-1}\left (\frac {b+2 a x}{2 \sqrt {a} \sqrt {c+b x+a x^2}}\right )}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.82, size = 375, normalized size = 1.09 \begin {gather*} \frac {1}{2} \left (\frac {2 a^{3/2} \tanh ^{-1}\left (\frac {2 a x+b}{2 \sqrt {a} \sqrt {x (a x+b)+c}}\right )}{b}+\frac {\left (-a^2 \sqrt {c}+a b^2 \sqrt {c}+(-b)^{5/2}\right ) \tan ^{-1}\left (\frac {2 a \sqrt {-b} \sqrt {c} x+b^2 (-x)-2 b c+\sqrt {-b} b \sqrt {c}}{2 \sqrt [4]{c} \sqrt {b \left (a \sqrt {c}+b \left (\sqrt {-b}-\sqrt {c}\right )\right )} \sqrt {x (a x+b)+c}}\right )}{\sqrt {-b} \sqrt [4]{c} \sqrt {b \left (a \sqrt {c}+b \left (\sqrt {-b}-\sqrt {c}\right )\right )}}+\frac {\left (a^2 \sqrt {c}-a b^2 \sqrt {c}+(-b)^{5/2}\right ) \tanh ^{-1}\left (\frac {2 a \sqrt {-b} \sqrt {c} x+b^2 x+2 b c+\sqrt {-b} b \sqrt {c}}{2 \sqrt [4]{c} \sqrt {b \left (b \left (\sqrt {-b}+\sqrt {c}\right )-a \sqrt {c}\right )} \sqrt {x (a x+b)+c}}\right )}{\sqrt {-b} \sqrt [4]{c} \sqrt {b \left (b \left (\sqrt {-b}+\sqrt {c}\right )-a \sqrt {c}\right )}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.53, size = 347, normalized size = 1.01 \begin {gather*} -\frac {a^{3/2} \log \left (b^2+2 a b x-2 \sqrt {a} b \sqrt {c+b x+a x^2}\right )}{b}+\frac {\text {RootSum}\left [b^2 c+b c^2-4 \sqrt {a} b c \text {$\#$1}+4 a c \text {$\#$1}^2-2 b c \text {$\#$1}^2+b \text {$\#$1}^4\&,\frac {-a^2 b c \log \left (-\sqrt {a} x+\sqrt {c+b x+a x^2}-\text {$\#$1}\right )+b^3 c \log \left (-\sqrt {a} x+\sqrt {c+b x+a x^2}-\text {$\#$1}\right )+a b^3 c \log \left (-\sqrt {a} x+\sqrt {c+b x+a x^2}-\text {$\#$1}\right )+2 a^{5/2} c \log \left (-\sqrt {a} x+\sqrt {c+b x+a x^2}-\text {$\#$1}\right ) \text {$\#$1}-2 a^{3/2} b^2 c \log \left (-\sqrt {a} x+\sqrt {c+b x+a x^2}-\text {$\#$1}\right ) \text {$\#$1}-b^3 \log \left (-\sqrt {a} x+\sqrt {c+b x+a x^2}-\text {$\#$1}\right ) \text {$\#$1}^2}{-\sqrt {a} b c+2 a c \text {$\#$1}-b c \text {$\#$1}+b \text {$\#$1}^3}\&\right ]}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] 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(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.64, size = 520, normalized size = 1.52
method | result | size |
default | \(\frac {a^{\frac {3}{2}} \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x +c}\right )}{b}-\frac {\left (a \,b^{2} c -\sqrt {-b c}\, b^{2}-a^{2} c \right ) \ln \left (\frac {-\frac {2 \left (-\sqrt {-b c}\, b +a c -b c \right )}{b}+\frac {\sqrt {-b c}\, \left (-\sqrt {-b c}\, b +2 a c \right ) \left (x -\frac {\sqrt {-b c}}{b}\right )}{b c}+2 \sqrt {-\frac {-\sqrt {-b c}\, b +a c -b c}{b}}\, \sqrt {\left (x -\frac {\sqrt {-b c}}{b}\right )^{2} a +\frac {\sqrt {-b c}\, \left (-\sqrt {-b c}\, b +2 a c \right ) \left (x -\frac {\sqrt {-b c}}{b}\right )}{b c}-\frac {-\sqrt {-b c}\, b +a c -b c}{b}}}{x -\frac {\sqrt {-b c}}{b}}\right )}{2 \sqrt {-b c}\, b \sqrt {-\frac {-\sqrt {-b c}\, b +a c -b c}{b}}}-\frac {\left (-a \,b^{2} c -\sqrt {-b c}\, b^{2}+a^{2} c \right ) \ln \left (\frac {-\frac {2 \left (\sqrt {-b c}\, b +a c -b c \right )}{b}-\frac {\sqrt {-b c}\, \left (\sqrt {-b c}\, b +2 a c \right ) \left (x +\frac {\sqrt {-b c}}{b}\right )}{b c}+2 \sqrt {-\frac {\sqrt {-b c}\, b +a c -b c}{b}}\, \sqrt {\left (x +\frac {\sqrt {-b c}}{b}\right )^{2} a -\frac {\sqrt {-b c}\, \left (\sqrt {-b c}\, b +2 a c \right ) \left (x +\frac {\sqrt {-b c}}{b}\right )}{b c}-\frac {\sqrt {-b c}\, b +a c -b c}{b}}}{x +\frac {\sqrt {-b c}}{b}}\right )}{2 \sqrt {-b c}\, b \sqrt {-\frac {\sqrt {-b c}\, b +a c -b c}{b}}}\) | \(520\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a^{2} x^{2} + a b c - b^{2} x}{\sqrt {a x^{2} + b x + c} {\left (b x^{2} + c\right )}}\,{d x} \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 {a^2\,x^2+c\,a\,b-b^2\,x}{\left (b\,x^2+c\right )\,\sqrt {a\,x^2+b\,x+c}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a^{2} x^{2} + a b c - b^{2} x}{\left (b x^{2} + c\right ) \sqrt {a x^{2} + b x + c}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________