Optimal. Leaf size=195 \[ -\frac {\left (c d^2-b d e+a e^2\right ) \sqrt {-1+x^2}}{2 e \left (d^2-e^2\right ) (d+e x)^2}+\frac {\left (c \left (d^3-4 d e^2\right )-e \left (3 a d e-b \left (d^2+2 e^2\right )\right )\right ) \sqrt {-1+x^2}}{2 e \left (d^2-e^2\right )^2 (d+e x)}-\frac {\left (3 b d e-a \left (2 d^2+e^2\right )-c \left (d^2+2 e^2\right )\right ) \tanh ^{-1}\left (\frac {e+d x}{\sqrt {d^2-e^2} \sqrt {-1+x^2}}\right )}{2 \left (d^2-e^2\right )^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 195, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {1665, 821, 739,
212} \begin {gather*} -\frac {\sqrt {x^2-1} \left (a e^2-b d e+c d^2\right )}{2 e \left (d^2-e^2\right ) (d+e x)^2}-\frac {\tanh ^{-1}\left (\frac {d x+e}{\sqrt {x^2-1} \sqrt {d^2-e^2}}\right ) \left (-a \left (2 d^2+e^2\right )+3 b d e-c \left (d^2+2 e^2\right )\right )}{2 \left (d^2-e^2\right )^{5/2}}+\frac {\sqrt {x^2-1} \left (c \left (d^3-4 d e^2\right )-e \left (3 a d e-b \left (d^2+2 e^2\right )\right )\right )}{2 e \left (d^2-e^2\right )^2 (d+e x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 739
Rule 821
Rule 1665
Rubi steps
\begin {align*} \int \frac {a+b x+c x^2}{(d+e x)^3 \sqrt {-1+x^2}} \, dx &=-\frac {\left (c d^2-b d e+a e^2\right ) \sqrt {-1+x^2}}{2 e \left (d^2-e^2\right ) (d+e x)^2}-\frac {\int \frac {-2 (a d+c d-b e)-\left (b d+\frac {c d^2}{e}-a e-2 c e\right ) x}{(d+e x)^2 \sqrt {-1+x^2}} \, dx}{2 \left (d^2-e^2\right )}\\ &=-\frac {\left (c d^2-b d e+a e^2\right ) \sqrt {-1+x^2}}{2 e \left (d^2-e^2\right ) (d+e x)^2}+\frac {\left (c \left (d^3-4 d e^2\right )-e \left (3 a d e-b \left (d^2+2 e^2\right )\right )\right ) \sqrt {-1+x^2}}{2 e \left (d^2-e^2\right )^2 (d+e x)}-\frac {\left (3 b d e-a \left (2 d^2+e^2\right )-c \left (d^2+2 e^2\right )\right ) \int \frac {1}{(d+e x) \sqrt {-1+x^2}} \, dx}{2 \left (d^2-e^2\right )^2}\\ &=-\frac {\left (c d^2-b d e+a e^2\right ) \sqrt {-1+x^2}}{2 e \left (d^2-e^2\right ) (d+e x)^2}+\frac {\left (c \left (d^3-4 d e^2\right )-e \left (3 a d e-b \left (d^2+2 e^2\right )\right )\right ) \sqrt {-1+x^2}}{2 e \left (d^2-e^2\right )^2 (d+e x)}+\frac {\left (3 b d e-a \left (2 d^2+e^2\right )-c \left (d^2+2 e^2\right )\right ) \text {Subst}\left (\int \frac {1}{d^2-e^2-x^2} \, dx,x,\frac {-e-d x}{\sqrt {-1+x^2}}\right )}{2 \left (d^2-e^2\right )^2}\\ &=-\frac {\left (c d^2-b d e+a e^2\right ) \sqrt {-1+x^2}}{2 e \left (d^2-e^2\right ) (d+e x)^2}+\frac {\left (c \left (d^3-4 d e^2\right )-e \left (3 a d e-b \left (d^2+2 e^2\right )\right )\right ) \sqrt {-1+x^2}}{2 e \left (d^2-e^2\right )^2 (d+e x)}-\frac {\left (3 b d e-a \left (2 d^2+e^2\right )-c \left (d^2+2 e^2\right )\right ) \tanh ^{-1}\left (\frac {e+d x}{\sqrt {d^2-e^2} \sqrt {-1+x^2}}\right )}{2 \left (d^2-e^2\right )^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.02, size = 179, normalized size = 0.92 \begin {gather*} \frac {\frac {(d-e) (d+e) \sqrt {-1+x^2} \left (a e \left (-4 d^2+e^2-3 d e x\right )+c d \left (-3 d e+d^2 x-4 e^2 x\right )+b \left (2 d^3+d e^2+d^2 e x+2 e^3 x\right )\right )}{(d+e x)^2}+2 \sqrt {-d^2+e^2} \left (-3 b d e+a \left (2 d^2+e^2\right )+c \left (d^2+2 e^2\right )\right ) \tan ^{-1}\left (\frac {d+e \left (x-\sqrt {-1+x^2}\right )}{\sqrt {-d^2+e^2}}\right )}{2 (d-e)^3 (d+e)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(728\) vs.
\(2(179)=358\).
time = 0.52, size = 729, normalized size = 3.74
method | result | size |
default | \(-\frac {c \ln \left (\frac {\frac {2 d^{2}-2 e^{2}}{e^{2}}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {d^{2}-e^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+\frac {d^{2}-e^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{3} \sqrt {\frac {d^{2}-e^{2}}{e^{2}}}}+\frac {\left (e b -2 c d \right ) \left (-\frac {e^{2} \sqrt {\left (x +\frac {d}{e}\right )^{2}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+\frac {d^{2}-e^{2}}{e^{2}}}}{\left (d^{2}-e^{2}\right ) \left (x +\frac {d}{e}\right )}-\frac {d e \ln \left (\frac {\frac {2 d^{2}-2 e^{2}}{e^{2}}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {d^{2}-e^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+\frac {d^{2}-e^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{\left (d^{2}-e^{2}\right ) \sqrt {\frac {d^{2}-e^{2}}{e^{2}}}}\right )}{e^{4}}+\frac {\left (a \,e^{2}-d e b +c \,d^{2}\right ) \left (-\frac {e^{2} \sqrt {\left (x +\frac {d}{e}\right )^{2}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+\frac {d^{2}-e^{2}}{e^{2}}}}{2 \left (d^{2}-e^{2}\right ) \left (x +\frac {d}{e}\right )^{2}}+\frac {3 d e \left (-\frac {e^{2} \sqrt {\left (x +\frac {d}{e}\right )^{2}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+\frac {d^{2}-e^{2}}{e^{2}}}}{\left (d^{2}-e^{2}\right ) \left (x +\frac {d}{e}\right )}-\frac {d e \ln \left (\frac {\frac {2 d^{2}-2 e^{2}}{e^{2}}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {d^{2}-e^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+\frac {d^{2}-e^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{\left (d^{2}-e^{2}\right ) \sqrt {\frac {d^{2}-e^{2}}{e^{2}}}}\right )}{2 \left (d^{2}-e^{2}\right )}+\frac {e^{2} \ln \left (\frac {\frac {2 d^{2}-2 e^{2}}{e^{2}}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {d^{2}-e^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2}-\frac {2 d \left (x +\frac {d}{e}\right )}{e}+\frac {d^{2}-e^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{2 \left (d^{2}-e^{2}\right ) \sqrt {\frac {d^{2}-e^{2}}{e^{2}}}}\right )}{e^{5}}\) | \(729\) |
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 [B] Leaf count of result is larger than twice the leaf count of optimal. 548 vs.
\(2 (175) = 350\).
time = 0.40, size = 1122, normalized size = 5.75 \begin {gather*} \left [\frac {c d^{7} - 2 \, b x^{2} e^{7} + {\left ({\left (2 \, a + c\right )} d^{4} e^{2} + {\left (a + 2 \, c\right )} x^{2} e^{6} - {\left (3 \, b d x^{2} - 2 \, {\left (a + 2 \, c\right )} d x\right )} e^{5} + {\left ({\left (2 \, a + c\right )} d^{2} x^{2} - 6 \, b d^{2} x + {\left (a + 2 \, c\right )} d^{2}\right )} e^{4} + {\left (2 \, {\left (2 \, a + c\right )} d^{3} x - 3 \, b d^{3}\right )} e^{3}\right )} \sqrt {d^{2} - e^{2}} \log \left (\frac {d^{2} x + d e + \sqrt {d^{2} - e^{2}} {\left (d x + e\right )} + {\left (d^{2} + \sqrt {d^{2} - e^{2}} d - e^{2}\right )} \sqrt {x^{2} - 1}}{x e + d}\right ) + {\left ({\left (3 \, a + 4 \, c\right )} d x^{2} - 4 \, b d x\right )} e^{6} + {\left (b d^{2} x^{2} + 2 \, {\left (3 \, a + 4 \, c\right )} d^{2} x - 2 \, b d^{2}\right )} e^{5} - {\left ({\left (3 \, a + 5 \, c\right )} d^{3} x^{2} - 2 \, b d^{3} x - {\left (3 \, a + 4 \, c\right )} d^{3}\right )} e^{4} + {\left (b d^{4} x^{2} - 2 \, {\left (3 \, a + 5 \, c\right )} d^{4} x + b d^{4}\right )} e^{3} + {\left (c d^{5} x^{2} + 2 \, b d^{5} x - {\left (3 \, a + 5 \, c\right )} d^{5}\right )} e^{2} + {\left (2 \, c d^{6} x + b d^{6}\right )} e - \sqrt {x^{2} - 1} {\left ({\left (2 \, b x + a\right )} e^{7} - {\left ({\left (3 \, a + 4 \, c\right )} d x - b d\right )} e^{6} - {\left (b d^{2} x + {\left (5 \, a + 3 \, c\right )} d^{2}\right )} e^{5} + {\left ({\left (3 \, a + 5 \, c\right )} d^{3} x + b d^{3}\right )} e^{4} - {\left (b d^{4} x - {\left (4 \, a + 3 \, c\right )} d^{4}\right )} e^{3} - {\left (c d^{5} x + 2 \, b d^{5}\right )} e^{2}\right )}}{2 \, {\left (2 \, d^{7} x e^{3} + d^{8} e^{2} - 6 \, d^{5} x e^{5} + 6 \, d^{3} x e^{7} - x^{2} e^{10} - 2 \, d x e^{9} + {\left (3 \, d^{2} x^{2} - d^{2}\right )} e^{8} - 3 \, {\left (d^{4} x^{2} - d^{4}\right )} e^{6} + {\left (d^{6} x^{2} - 3 \, d^{6}\right )} e^{4}\right )}}, \frac {c d^{7} - 2 \, b x^{2} e^{7} - 2 \, {\left ({\left (2 \, a + c\right )} d^{4} e^{2} + {\left (a + 2 \, c\right )} x^{2} e^{6} - {\left (3 \, b d x^{2} - 2 \, {\left (a + 2 \, c\right )} d x\right )} e^{5} + {\left ({\left (2 \, a + c\right )} d^{2} x^{2} - 6 \, b d^{2} x + {\left (a + 2 \, c\right )} d^{2}\right )} e^{4} + {\left (2 \, {\left (2 \, a + c\right )} d^{3} x - 3 \, b d^{3}\right )} e^{3}\right )} \sqrt {-d^{2} + e^{2}} \arctan \left (\frac {\sqrt {-d^{2} + e^{2}} {\left (x e - \sqrt {x^{2} - 1} e + d\right )}}{d^{2} - e^{2}}\right ) + {\left ({\left (3 \, a + 4 \, c\right )} d x^{2} - 4 \, b d x\right )} e^{6} + {\left (b d^{2} x^{2} + 2 \, {\left (3 \, a + 4 \, c\right )} d^{2} x - 2 \, b d^{2}\right )} e^{5} - {\left ({\left (3 \, a + 5 \, c\right )} d^{3} x^{2} - 2 \, b d^{3} x - {\left (3 \, a + 4 \, c\right )} d^{3}\right )} e^{4} + {\left (b d^{4} x^{2} - 2 \, {\left (3 \, a + 5 \, c\right )} d^{4} x + b d^{4}\right )} e^{3} + {\left (c d^{5} x^{2} + 2 \, b d^{5} x - {\left (3 \, a + 5 \, c\right )} d^{5}\right )} e^{2} + {\left (2 \, c d^{6} x + b d^{6}\right )} e - \sqrt {x^{2} - 1} {\left ({\left (2 \, b x + a\right )} e^{7} - {\left ({\left (3 \, a + 4 \, c\right )} d x - b d\right )} e^{6} - {\left (b d^{2} x + {\left (5 \, a + 3 \, c\right )} d^{2}\right )} e^{5} + {\left ({\left (3 \, a + 5 \, c\right )} d^{3} x + b d^{3}\right )} e^{4} - {\left (b d^{4} x - {\left (4 \, a + 3 \, c\right )} d^{4}\right )} e^{3} - {\left (c d^{5} x + 2 \, b d^{5}\right )} e^{2}\right )}}{2 \, {\left (2 \, d^{7} x e^{3} + d^{8} e^{2} - 6 \, d^{5} x e^{5} + 6 \, d^{3} x e^{7} - x^{2} e^{10} - 2 \, d x e^{9} + {\left (3 \, d^{2} x^{2} - d^{2}\right )} e^{8} - 3 \, {\left (d^{4} x^{2} - d^{4}\right )} e^{6} + {\left (d^{6} x^{2} - 3 \, d^{6}\right )} e^{4}\right )}}\right ] \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 + b x + c x^{2}}{\sqrt {\left (x - 1\right ) \left (x + 1\right )} \left (d + e x\right )^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 536 vs.
\(2 (175) = 350\).
time = 1.74, size = 536, normalized size = 2.75 \begin {gather*} \frac {{\left (2 \, a d^{2} + c d^{2} - 3 \, b d e + a e^{2} + 2 \, c e^{2}\right )} \arctan \left (-\frac {{\left (x - \sqrt {x^{2} - 1}\right )} e + d}{\sqrt {-d^{2} + e^{2}}}\right )}{{\left (d^{4} - 2 \, d^{2} e^{2} + e^{4}\right )} \sqrt {-d^{2} + e^{2}}} + \frac {2 \, c d^{4} {\left (x - \sqrt {x^{2} - 1}\right )}^{3} e + 2 \, c d^{5} {\left (x - \sqrt {x^{2} - 1}\right )}^{2} + 2 \, b d^{4} {\left (x - \sqrt {x^{2} - 1}\right )}^{2} e - 2 \, a d^{2} {\left (x - \sqrt {x^{2} - 1}\right )}^{3} e^{3} - 5 \, c d^{2} {\left (x - \sqrt {x^{2} - 1}\right )}^{3} e^{3} - 6 \, a d^{3} {\left (x - \sqrt {x^{2} - 1}\right )}^{2} e^{2} - 7 \, c d^{3} {\left (x - \sqrt {x^{2} - 1}\right )}^{2} e^{2} + 2 \, c d^{4} {\left (x - \sqrt {x^{2} - 1}\right )} e + 3 \, b d {\left (x - \sqrt {x^{2} - 1}\right )}^{3} e^{4} + 5 \, b d^{2} {\left (x - \sqrt {x^{2} - 1}\right )}^{2} e^{3} + 4 \, b d^{3} {\left (x - \sqrt {x^{2} - 1}\right )} e^{2} - a {\left (x - \sqrt {x^{2} - 1}\right )}^{3} e^{5} - 3 \, a d {\left (x - \sqrt {x^{2} - 1}\right )}^{2} e^{4} - 4 \, c d {\left (x - \sqrt {x^{2} - 1}\right )}^{2} e^{4} - 10 \, a d^{2} {\left (x - \sqrt {x^{2} - 1}\right )} e^{3} - 11 \, c d^{2} {\left (x - \sqrt {x^{2} - 1}\right )} e^{3} + c d^{3} e^{2} + 2 \, b {\left (x - \sqrt {x^{2} - 1}\right )}^{2} e^{5} + 5 \, b d {\left (x - \sqrt {x^{2} - 1}\right )} e^{4} + b d^{2} e^{3} + a {\left (x - \sqrt {x^{2} - 1}\right )} e^{5} - 3 \, a d e^{4} - 4 \, c d e^{4} + 2 \, b e^{5}}{{\left (d^{4} e^{2} - 2 \, d^{2} e^{4} + e^{6}\right )} {\left ({\left (x - \sqrt {x^{2} - 1}\right )}^{2} e + 2 \, d {\left (x - \sqrt {x^{2} - 1}\right )} + e\right )}^{2}} \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 \frac {c\,x^2+b\,x+a}{\sqrt {x^2-1}\,{\left (d+e\,x\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________