Optimal. Leaf size=349 \[ \frac {1+(-1+x)^2}{8 (4+a) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )^2}+\frac {3 \left (1+(-1+x)^2\right )}{16 (4+a)^2 \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{8 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )^2}+\frac {\left ((6+a) (25+7 a)+6 (7+2 a) (-1+x)^2\right ) (-1+x)}{32 (3+a)^2 (4+a)^2 \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}-\frac {3 \left (80+7 a^2+14 \sqrt {4+a}+a \left (47+4 \sqrt {4+a}\right )\right ) \tan ^{-1}\left (\frac {-1+x}{\sqrt {1-\sqrt {4+a}}}\right )}{64 (3+a)^2 (4+a)^{5/2} \sqrt {1-\sqrt {4+a}}}-\frac {3 \left (14+4 a-\frac {80+47 a+7 a^2}{\sqrt {4+a}}\right ) \tan ^{-1}\left (\frac {-1+x}{\sqrt {1+\sqrt {4+a}}}\right )}{64 (3+a)^2 (4+a)^2 \sqrt {1+\sqrt {4+a}}}+\frac {3 \tanh ^{-1}\left (\frac {1+(-1+x)^2}{\sqrt {4+a}}\right )}{16 (4+a)^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.44, antiderivative size = 349, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 10, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {1694, 1687,
1106, 1192, 1180, 210, 1121, 628, 632, 212} \begin {gather*} -\frac {3 \left (7 a^2+\left (4 \sqrt {a+4}+47\right ) a+14 \sqrt {a+4}+80\right ) \text {ArcTan}\left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{64 (a+3)^2 (a+4)^{5/2} \sqrt {1-\sqrt {a+4}}}-\frac {3 \left (-\frac {7 a^2+47 a+80}{\sqrt {a+4}}+4 a+14\right ) \text {ArcTan}\left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{64 (a+3)^2 (a+4)^2 \sqrt {\sqrt {a+4}+1}}+\frac {(x-1) \left (a+(x-1)^2+5\right )}{8 \left (a^2+7 a+12\right ) \left (a-(x-1)^4-2 (x-1)^2+3\right )^2}+\frac {3 \left ((x-1)^2+1\right )}{16 (a+4)^2 \left (a-(x-1)^4-2 (x-1)^2+3\right )}+\frac {(x-1)^2+1}{8 (a+4) \left (a-(x-1)^4-2 (x-1)^2+3\right )^2}+\frac {(x-1) \left (6 (2 a+7) (x-1)^2+(a+6) (7 a+25)\right )}{32 (a+3)^2 (a+4)^2 \left (a-(x-1)^4-2 (x-1)^2+3\right )}+\frac {3 \tanh ^{-1}\left (\frac {(x-1)^2+1}{\sqrt {a+4}}\right )}{16 (a+4)^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 212
Rule 628
Rule 632
Rule 1106
Rule 1121
Rule 1180
Rule 1192
Rule 1687
Rule 1694
Rubi steps
\begin {align*} \int \frac {x}{\left (a+8 x-8 x^2+4 x^3-x^4\right )^3} \, dx &=\text {Subst}\left (\int \frac {1+x}{\left (3+a-2 x^2-x^4\right )^3} \, dx,x,-1+x\right )\\ &=\text {Subst}\left (\int \frac {1}{\left (3+a-2 x^2-x^4\right )^3} \, dx,x,-1+x\right )+\text {Subst}\left (\int \frac {x}{\left (3+a-2 x^2-x^4\right )^3} \, dx,x,-1+x\right )\\ &=\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{8 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )^2}+\frac {1}{2} \text {Subst}\left (\int \frac {1}{\left (3+a-2 x-x^2\right )^3} \, dx,x,(-1+x)^2\right )-\frac {\text {Subst}\left (\int \frac {4+2 (3+a)-4 (4+4 (3+a))-10 x^2}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )}{16 \left (12+7 a+a^2\right )}\\ &=\frac {1+(-1+x)^2}{8 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )^2}-\frac {\left ((6+a) (25+7 a)+6 (7+2 a) (1-x)^2\right ) (1-x)}{32 \left (12+7 a+a^2\right )^2 \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{8 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )^2}+\frac {3 \text {Subst}\left (\int \frac {1}{\left (3+a-2 x-x^2\right )^2} \, dx,x,(-1+x)^2\right )}{8 (4+a)}+\frac {\text {Subst}\left (\int \frac {12 \left (94+51 a+7 a^2\right )+24 (7+2 a) x^2}{3+a-2 x^2-x^4} \, dx,x,-1+x\right )}{128 \left (12+7 a+a^2\right )^2}\\ &=\frac {1+(-1+x)^2}{8 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )^2}+\frac {3 \left (1+(-1+x)^2\right )}{16 (4+a)^2 \left (3+a-2 (1-x)^2-(1-x)^4\right )}-\frac {\left ((6+a) (25+7 a)+6 (7+2 a) (1-x)^2\right ) (1-x)}{32 \left (12+7 a+a^2\right )^2 \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{8 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )^2}+\frac {3 \text {Subst}\left (\int \frac {1}{3+a-2 x-x^2} \, dx,x,(-1+x)^2\right )}{16 (4+a)^2}+\frac {\left (3 \left (14+4 a-\frac {80+47 a+7 a^2}{\sqrt {4+a}}\right )\right ) \text {Subst}\left (\int \frac {1}{-1-\sqrt {4+a}-x^2} \, dx,x,-1+x\right )}{64 \left (12+7 a+a^2\right )^2}+\frac {\left (3 \left (80+7 a^2+14 \sqrt {4+a}+a \left (47+4 \sqrt {4+a}\right )\right )\right ) \text {Subst}\left (\int \frac {1}{-1+\sqrt {4+a}-x^2} \, dx,x,-1+x\right )}{64 \sqrt {4+a} \left (12+7 a+a^2\right )^2}\\ &=\frac {1+(-1+x)^2}{8 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )^2}+\frac {3 \left (1+(-1+x)^2\right )}{16 (4+a)^2 \left (3+a-2 (1-x)^2-(1-x)^4\right )}-\frac {\left ((6+a) (25+7 a)+6 (7+2 a) (1-x)^2\right ) (1-x)}{32 \left (12+7 a+a^2\right )^2 \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{8 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )^2}+\frac {3 \left (80+47 a+7 a^2+\sqrt {4+a} (14+4 a)\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{64 (3+a)^2 (4+a)^{5/2} \sqrt {1-\sqrt {4+a}}}+\frac {3 \left (14+4 a-\frac {80+47 a+7 a^2}{\sqrt {4+a}}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{64 \left (12+7 a+a^2\right )^2 \sqrt {1+\sqrt {4+a}}}-\frac {3 \text {Subst}\left (\int \frac {1}{4 (4+a)-x^2} \, dx,x,-2 \left (1+(-1+x)^2\right )\right )}{8 (4+a)^2}\\ &=\frac {1+(-1+x)^2}{8 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )^2}+\frac {3 \left (1+(-1+x)^2\right )}{16 (4+a)^2 \left (3+a-2 (1-x)^2-(1-x)^4\right )}-\frac {\left ((6+a) (25+7 a)+6 (7+2 a) (1-x)^2\right ) (1-x)}{32 \left (12+7 a+a^2\right )^2 \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{8 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )^2}+\frac {3 \left (80+47 a+7 a^2+\sqrt {4+a} (14+4 a)\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{64 (3+a)^2 (4+a)^{5/2} \sqrt {1-\sqrt {4+a}}}+\frac {3 \left (14+4 a-\frac {80+47 a+7 a^2}{\sqrt {4+a}}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{64 \left (12+7 a+a^2\right )^2 \sqrt {1+\sqrt {4+a}}}+\frac {3 \tanh ^{-1}\left (\frac {1+(-1+x)^2}{\sqrt {4+a}}\right )}{16 (4+a)^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.10, size = 284, normalized size = 0.81 \begin {gather*} \frac {1}{128} \left (\frac {16 \left (a+2 x-a x+a x^2+x^3\right )}{(3+a) (4+a) \left (a-x \left (-8+8 x-4 x^2+x^3\right )\right )^2}+\frac {4 \left (a^2 \left (5-5 x+6 x^2\right )+6 \left (-14+28 x-12 x^2+7 x^3\right )+a \left (-7+31 x+12 x^3\right )\right )}{(3+a)^2 (4+a)^2 \left (a-x \left (-8+8 x-4 x^2+x^3\right )\right )}-\frac {3 \text {RootSum}\left [a+8 \text {$\#$1}-8 \text {$\#$1}^2+4 \text {$\#$1}^3-\text {$\#$1}^4\&,\frac {72 \log (x-\text {$\#$1})+31 a \log (x-\text {$\#$1})+3 a^2 \log (x-\text {$\#$1})+8 \log (x-\text {$\#$1}) \text {$\#$1}+16 a \log (x-\text {$\#$1}) \text {$\#$1}+4 a^2 \log (x-\text {$\#$1}) \text {$\#$1}+14 \log (x-\text {$\#$1}) \text {$\#$1}^2+4 a \log (x-\text {$\#$1}) \text {$\#$1}^2}{-2+4 \text {$\#$1}-3 \text {$\#$1}^2+\text {$\#$1}^3}\&\right ]}{\left (12+7 a+a^2\right )^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.05, size = 409, normalized size = 1.17
method | result | size |
default | \(-\frac {\frac {3 \left (7+2 a \right ) x^{7}}{16 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}+\frac {3 \left (a^{2}-8 a -40\right ) x^{6}}{16 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}-\frac {\left (29 a^{2}-127 a -792\right ) x^{5}}{32 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}+\frac {\left (73 a^{2}-227 a -1668\right ) x^{4}}{32 a^{4}+448 a^{3}+2336 a^{2}+5376 a +4608}-\frac {\left (62 a^{2}-103 a -1104\right ) x^{3}}{16 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}-\frac {\left (5 a^{3}-26 a^{2}+140 a +1008\right ) x^{2}}{16 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}+\frac {3 \left (3 a^{3}-17 a^{2}-40 a +192\right ) x}{32 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}-\frac {3 a \left (3 a^{2}+7 a -12\right )}{32 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}}{\left (-x^{4}+4 x^{3}-8 x^{2}+a +8 x \right )^{2}}-\frac {3 \left (\munderset {\textit {\_R} =\RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\left (-72+2 \left (-2 a -7\right ) \textit {\_R}^{2}+4 \left (-a^{2}-4 a -2\right ) \textit {\_R} -3 a^{2}-31 a \right ) \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{128 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}\) | \(409\) |
risch | \(\frac {-\frac {3 \left (7+2 a \right ) x^{7}}{16 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}-\frac {3 \left (a^{2}-8 a -40\right ) x^{6}}{16 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}+\frac {\left (29 a^{2}-127 a -792\right ) x^{5}}{32 a^{4}+448 a^{3}+2336 a^{2}+5376 a +4608}-\frac {\left (73 a^{2}-227 a -1668\right ) x^{4}}{32 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}+\frac {\left (62 a^{2}-103 a -1104\right ) x^{3}}{16 a^{4}+224 a^{3}+1168 a^{2}+2688 a +2304}+\frac {\left (5 a^{3}-26 a^{2}+140 a +1008\right ) x^{2}}{16 a^{4}+224 a^{3}+1168 a^{2}+2688 a +2304}-\frac {3 \left (3 a^{3}-17 a^{2}-40 a +192\right ) x}{32 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}+\frac {3 a \left (3 a^{2}+7 a -12\right )}{32 \left (a^{4}+14 a^{3}+73 a^{2}+168 a +144\right )}}{\left (-x^{4}+4 x^{3}-8 x^{2}+a +8 x \right )^{2}}+\frac {3 \left (\munderset {\textit {\_R} =\RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\left (\frac {2 \left (7+2 a \right ) \textit {\_R}^{2}}{a^{4}+14 a^{3}+73 a^{2}+168 a +144}+\frac {4 \left (a^{2}+4 a +2\right ) \textit {\_R}}{a^{4}+14 a^{3}+73 a^{2}+168 a +144}+\frac {3 a^{2}+31 a +72}{a^{4}+14 a^{3}+73 a^{2}+168 a +144}\right ) \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{128}\) | \(448\) |
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*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [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]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1102 vs.
\(2 (318) = 636\).
time = 49.64, size = 1102, normalized size = 3.16 \begin {gather*} - \frac {- 9 a^{3} - 21 a^{2} + 36 a + x^{7} \cdot \left (12 a + 42\right ) + x^{6} \cdot \left (6 a^{2} - 48 a - 240\right ) + x^{5} \left (- 29 a^{2} + 127 a + 792\right ) + x^{4} \cdot \left (73 a^{2} - 227 a - 1668\right ) + x^{3} \left (- 124 a^{2} + 206 a + 2208\right ) + x^{2} \left (- 10 a^{3} + 52 a^{2} - 280 a - 2016\right ) + x \left (9 a^{3} - 51 a^{2} - 120 a + 576\right )}{32 a^{6} + 448 a^{5} + 2336 a^{4} + 5376 a^{3} + 4608 a^{2} + x^{8} \cdot \left (32 a^{4} + 448 a^{3} + 2336 a^{2} + 5376 a + 4608\right ) + x^{7} \left (- 256 a^{4} - 3584 a^{3} - 18688 a^{2} - 43008 a - 36864\right ) + x^{6} \cdot \left (1024 a^{4} + 14336 a^{3} + 74752 a^{2} + 172032 a + 147456\right ) + x^{5} \left (- 2560 a^{4} - 35840 a^{3} - 186880 a^{2} - 430080 a - 368640\right ) + x^{4} \left (- 64 a^{5} + 3200 a^{4} + 52672 a^{3} + 288256 a^{2} + 678912 a + 589824\right ) + x^{3} \cdot \left (256 a^{5} - 512 a^{4} - 38656 a^{3} - 256000 a^{2} - 651264 a - 589824\right ) + x^{2} \left (- 512 a^{5} - 5120 a^{4} - 8704 a^{3} + 63488 a^{2} + 270336 a + 294912\right ) + x \left (512 a^{5} + 7168 a^{4} + 37376 a^{3} + 86016 a^{2} + 73728 a\right )} - \operatorname {RootSum} {\left (t^{4} \cdot \left (268435456 a^{15} + 14763950080 a^{14} + 378493992960 a^{13} + 5999532441600 a^{12} + 65757291479040 a^{11} + 527875908304896 a^{10} + 3206246773555200 a^{9} + 15003759578972160 a^{8} + 54537151127224320 a^{7} + 153980418717122560 a^{6} + 334927734494986240 a^{5} + 551152193655275520 a^{4} + 664192984106926080 a^{3} + 553362212027105280 a^{2} + 284993413919539200 a + 68398419340689408\right ) + t^{2} \left (- 4718592 a^{10} - 196116480 a^{9} - 3648061440 a^{8} - 40022212608 a^{7} - 286939938816 a^{6} - 1405437345792 a^{5} - 4764645457920 a^{4} - 11043392716800 a^{3} - 16752587046912 a^{2} - 15023392948224 a - 6049461436416\right ) + t \left (- 2709504 a^{7} - 72880128 a^{6} - 839890944 a^{5} - 5375877120 a^{4} - 20640890880 a^{3} - 47542173696 a^{2} - 60827369472 a - 33351008256\right ) + 20736 a^{5} - 155601 a^{4} - 4706424 a^{3} - 29249424 a^{2} - 74027520 a - 68345856, \left ( t \mapsto t \log {\left (x + \frac {- 469762048 t^{3} a^{20} - 31417434112 t^{3} a^{19} - 992305217536 t^{3} a^{18} - 19663576629248 t^{3} a^{17} - 273880031690752 t^{3} a^{16} - 2846116194287616 t^{3} a^{15} - 22853982892326912 t^{3} a^{14} - 144840417605582848 t^{3} a^{13} - 733193154773123072 t^{3} a^{12} - 2977941469704224768 t^{3} a^{11} - 9677197373117300736 t^{3} a^{10} - 24850421452415959040 t^{3} a^{9} - 48984708931769073664 t^{3} a^{8} - 69124682329943441408 t^{3} a^{7} - 54921507243737219072 t^{3} a^{6} + 18833423088924753920 t^{3} a^{5} + 128767022044444360704 t^{3} a^{4} + 197893824476545548288 t^{3} a^{3} + 170576989286005997568 t^{3} a^{2} + 83709868624400351232 t^{3} a + 18392762450832261120 t^{3} + 136642560 t^{2} a^{17} + 7616593920 t^{2} a^{16} + 198980665344 t^{2} a^{15} + 3234300690432 t^{2} a^{14} + 36614363283456 t^{2} a^{13} + 306155605721088 t^{2} a^{12} + 1956339656687616 t^{2} a^{11} + 9747894775578624 t^{2} a^{10} + 38291841445330944 t^{2} a^{9} + 119050488573591552 t^{2} a^{8} + 292236772188880896 t^{2} a^{7} + 561261720373297152 t^{2} a^{6} + 828898581078343680 t^{2} a^{5} + 914439454498750464 t^{2} a^{4} + 718255692208668672 t^{2} a^{3} + 369227414724673536 t^{2} a^{2} + 104815442748506112 t^{2} a + 10263520138493952 t^{2} + 4128768 t a^{15} + 235608192 t a^{14} + 6050117376 t a^{13} + 92875570560 t a^{12} + 950838962688 t a^{11} + 6825858397056 t a^{10} + 34932826734336 t a^{9} + 125262778564224 t a^{8} + 287989861404672 t a^{7} + 257684685023232 t a^{6} - 836263788945408 t a^{5} - 4002432415137792 t a^{4} - 8409454278082560 t a^{3} - 10371340262965248 t a^{2} - 7285247072796672 t a - 2270140431335424 t + 1000512 a^{12} + 42546357 a^{11} + 777344580 a^{10} + 7998006582 a^{9} + 50045408388 a^{8} + 182866499613 a^{7} + 247394170512 a^{6} - 1063305068832 a^{5} - 6960658344192 a^{4} - 19132655580288 a^{3} - 30001872614400 a^{2} - 26192892672000 a - 9953981595648}{1354752 a^{12} + 44550027 a^{11} + 663517980 a^{10} + 5951170602 a^{9} + 36270700668 a^{8} + 162289912419 a^{7} + 567868212432 a^{6} + 1626099007104 a^{5} + 3825839091456 a^{4} + 7035734732544 a^{3} + 9216760449024 a^{2} + 7467334520832 a + 2773884911616} \right )} \right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [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]
________________________________________________________________________________________
Mupad [B]
time = 3.39, size = 2500, normalized size = 7.16 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________