Optimal. Leaf size=231 \[ \frac {1+(-1+x)^2}{4 (4+a) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{4 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}-\frac {\left (10+3 a+\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {-1+x}{\sqrt {1-\sqrt {4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt {1-\sqrt {4+a}}}+\frac {\left (10+3 a-\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {-1+x}{\sqrt {1+\sqrt {4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt {1+\sqrt {4+a}}}+\frac {\tanh ^{-1}\left (\frac {1+(-1+x)^2}{\sqrt {4+a}}\right )}{4 (4+a)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 231, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {1694, 1687,
1106, 1180, 210, 1121, 628, 632, 212} \begin {gather*} \frac {(x-1) \left (a+(x-1)^2+5\right )}{4 \left (a^2+7 a+12\right ) \left (a-(x-1)^4-2 (x-1)^2+3\right )}-\frac {\left (3 a+\sqrt {a+4}+10\right ) \text {ArcTan}\left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{8 (a+3) (a+4)^{3/2} \sqrt {1-\sqrt {a+4}}}+\frac {\left (3 a-\sqrt {a+4}+10\right ) \text {ArcTan}\left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{8 (a+3) (a+4)^{3/2} \sqrt {\sqrt {a+4}+1}}+\frac {(x-1)^2+1}{4 (a+4) \left (a-(x-1)^4-2 (x-1)^2+3\right )}+\frac {\tanh ^{-1}\left (\frac {(x-1)^2+1}{\sqrt {a+4}}\right )}{4 (a+4)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 212
Rule 628
Rule 632
Rule 1106
Rule 1121
Rule 1180
Rule 1687
Rule 1694
Rubi steps
\begin {align*} \int \frac {x}{\left (a+8 x-8 x^2+4 x^3-x^4\right )^2} \, dx &=\text {Subst}\left (\int \frac {1+x}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )\\ &=\text {Subst}\left (\int \frac {1}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )+\text {Subst}\left (\int \frac {x}{\left (3+a-2 x^2-x^4\right )^2} \, dx,x,-1+x\right )\\ &=\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{4 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac {1}{2} \text {Subst}\left (\int \frac {1}{\left (3+a-2 x-x^2\right )^2} \, dx,x,(-1+x)^2\right )-\frac {\text {Subst}\left (\int \frac {4+2 (3+a)-2 (4+4 (3+a))-2 x^2}{3+a-2 x^2-x^4} \, dx,x,-1+x\right )}{8 \left (12+7 a+a^2\right )}\\ &=\frac {1+(-1+x)^2}{4 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{4 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac {\text {Subst}\left (\int \frac {1}{3+a-2 x-x^2} \, dx,x,(-1+x)^2\right )}{4 (4+a)}-\frac {\left (10+3 a-\sqrt {4+a}\right ) \text {Subst}\left (\int \frac {1}{-1-\sqrt {4+a}-x^2} \, dx,x,-1+x\right )}{8 (3+a) (4+a)^{3/2}}+\frac {\left (10+3 a+\sqrt {4+a}\right ) \text {Subst}\left (\int \frac {1}{-1+\sqrt {4+a}-x^2} \, dx,x,-1+x\right )}{8 (3+a) (4+a)^{3/2}}\\ &=\frac {1+(-1+x)^2}{4 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{4 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac {\left (10+3 a+\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt {1-\sqrt {4+a}}}-\frac {\left (10+3 a-\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt {1+\sqrt {4+a}}}-\frac {\text {Subst}\left (\int \frac {1}{4 (4+a)-x^2} \, dx,x,-2 \left (1+(-1+x)^2\right )\right )}{2 (4+a)}\\ &=\frac {1+(-1+x)^2}{4 (4+a) \left (3+a-2 (1-x)^2-(1-x)^4\right )}+\frac {\left (5+a+(-1+x)^2\right ) (-1+x)}{4 \left (12+7 a+a^2\right ) \left (3+a-2 (-1+x)^2-(-1+x)^4\right )}+\frac {\left (10+3 a+\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt {1-\sqrt {4+a}}}-\frac {\left (10+3 a-\sqrt {4+a}\right ) \tan ^{-1}\left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{8 (3+a) (4+a)^{3/2} \sqrt {1+\sqrt {4+a}}}+\frac {\tanh ^{-1}\left (\frac {1+(-1+x)^2}{\sqrt {4+a}}\right )}{4 (4+a)^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.05, size = 166, normalized size = 0.72 \begin {gather*} \frac {a+2 x-a x+a x^2+x^3}{4 (3+a) (4+a) \left (a-x \left (-8+8 x-4 x^2+x^3\right )\right )}-\frac {\text {RootSum}\left [a+8 \text {$\#$1}-8 \text {$\#$1}^2+4 \text {$\#$1}^3-\text {$\#$1}^4\&,\frac {6 \log (x-\text {$\#$1})+a \log (x-\text {$\#$1})+4 \log (x-\text {$\#$1}) \text {$\#$1}+2 a \log (x-\text {$\#$1}) \text {$\#$1}+\log (x-\text {$\#$1}) \text {$\#$1}^2}{-2+4 \text {$\#$1}-3 \text {$\#$1}^2+\text {$\#$1}^3}\&\right ]}{16 \left (12+7 a+a^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.03, size = 158, normalized size = 0.68
method | result | size |
default | \(\frac {\frac {x^{3}}{4 a^{2}+28 a +48}+\frac {a \,x^{2}}{4 \left (4+a \right ) \left (3+a \right )}-\frac {\left (a -2\right ) x}{4 \left (a^{2}+7 a +12\right )}+\frac {a}{4 a^{2}+28 a +48}}{-x^{4}+4 x^{3}-8 x^{2}+a +8 x}+\frac {\munderset {\textit {\_R} =\RootOf \left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\left (6+\textit {\_R}^{2}+2 \left (a +2\right ) \textit {\_R} +a \right ) \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}}{16 a^{2}+112 a +192}\) | \(158\) |
risch | \(\frac {\frac {x^{3}}{4 a^{2}+28 a +48}+\frac {a \,x^{2}}{4 \left (4+a \right ) \left (3+a \right )}-\frac {\left (a -2\right ) x}{4 \left (a^{2}+7 a +12\right )}+\frac {a}{4 a^{2}+28 a +48}}{-x^{4}+4 x^{3}-8 x^{2}+a +8 x}+\frac {\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 {\textit {\_R}^{2}}{a^{2}+7 a +12}+\frac {2 \left (a +2\right ) \textit {\_R}}{a^{2}+7 a +12}+\frac {6+a}{a^{2}+7 a +12}\right ) \ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{16}\) | \(181\) |
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. 539 vs.
\(2 (197) = 394\).
time = 18.78, size = 539, normalized size = 2.33 \begin {gather*} \frac {- a x^{2} - a - x^{3} + x \left (a - 2\right )}{- 4 a^{3} - 28 a^{2} - 48 a + x^{4} \cdot \left (4 a^{2} + 28 a + 48\right ) + x^{3} \left (- 16 a^{2} - 112 a - 192\right ) + x^{2} \cdot \left (32 a^{2} + 224 a + 384\right ) + x \left (- 32 a^{2} - 224 a - 384\right )} + \operatorname {RootSum} {\left (t^{4} \cdot \left (65536 a^{9} + 2162688 a^{8} + 31653888 a^{7} + 269680640 a^{6} + 1473773568 a^{5} + 5357174784 a^{4} + 12952010752 a^{3} + 20082327552 a^{2} + 18119393280 a + 7247757312\right ) + t^{2} \left (- 2048 a^{6} - 50688 a^{5} - 520704 a^{4} - 2842624 a^{3} - 8699904 a^{2} - 14155776 a - 9568256\right ) + t \left (1152 a^{4} + 17792 a^{3} + 102912 a^{2} + 264192 a + 253952\right ) + 16 a^{3} - 57 a^{2} - 984 a - 2064, \left ( t \mapsto t \log {\left (x + \frac {98304 t^{3} a^{12} + 3948544 t^{3} a^{11} + 72196096 t^{3} a^{10} + 793837568 t^{3} a^{9} + 5839372288 t^{3} a^{8} + 30226464768 t^{3} a^{7} + 112668450816 t^{3} a^{6} + 303864643584 t^{3} a^{5} + 586157391872 t^{3} a^{4} + 784017129472 t^{3} a^{3} + 683648483328 t^{3} a^{2} + 343136010240 t^{3} a + 72477573120 t^{3} + 30208 t^{2} a^{10} + 986624 t^{2} a^{9} + 14420992 t^{2} a^{8} + 124156928 t^{2} a^{7} + 696815104 t^{2} a^{6} + 2661758464 t^{2} a^{5} + 7001485312 t^{2} a^{4} + 12506562560 t^{2} a^{3} + 14494924800 t^{2} a^{2} + 9820569600 t^{2} a + 2944401408 t^{2} - 1536 t a^{9} - 52048 t a^{8} - 757040 t a^{7} - 6200656 t a^{6} - 31380496 t a^{5} - 100736416 t a^{4} - 200813696 t a^{3} - 228144640 t a^{2} - 114632704 t a - 2490368 t + 248 a^{7} + 6797 a^{6} + 71132 a^{5} + 369745 a^{4} + 987758 a^{3} + 1128896 a^{2} - 129568 a - 956416}{576 a^{7} + 10985 a^{6} + 88746 a^{5} + 396609 a^{4} + 1076268 a^{3} + 1826304 a^{2} + 1867776 a + 917504} \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 = 2.82, size = 1167, normalized size = 5.05 \begin {gather*} \left (\sum _{k=1}^4\ln \left (-\mathrm {root}\left (12952010752\,a^3\,z^4+31653888\,a^7\,z^4+2162688\,a^8\,z^4+65536\,a^9\,z^4+18119393280\,a\,z^4+20082327552\,a^2\,z^4+1473773568\,a^5\,z^4+5357174784\,a^4\,z^4+269680640\,a^6\,z^4+7247757312\,z^4-8699904\,a^2\,z^2-2842624\,a^3\,z^2-520704\,a^4\,z^2-50688\,a^5\,z^2-2048\,a^6\,z^2-14155776\,a\,z^2-9568256\,z^2+102912\,a^2\,z+17792\,a^3\,z+1152\,a^4\,z+264192\,a\,z+253952\,z-984\,a-57\,a^2+16\,a^3-2064,z,k\right )\,\left (\frac {336\,a^3+3600\,a^2+12800\,a+15104}{64\,\left (a^5+18\,a^4+129\,a^3+460\,a^2+816\,a+576\right )}+\mathrm {root}\left (12952010752\,a^3\,z^4+31653888\,a^7\,z^4+2162688\,a^8\,z^4+65536\,a^9\,z^4+18119393280\,a\,z^4+20082327552\,a^2\,z^4+1473773568\,a^5\,z^4+5357174784\,a^4\,z^4+269680640\,a^6\,z^4+7247757312\,z^4-8699904\,a^2\,z^2-2842624\,a^3\,z^2-520704\,a^4\,z^2-50688\,a^5\,z^2-2048\,a^6\,z^2-14155776\,a\,z^2-9568256\,z^2+102912\,a^2\,z+17792\,a^3\,z+1152\,a^4\,z+264192\,a\,z+253952\,z-984\,a-57\,a^2+16\,a^3-2064,z,k\right )\,\left (\mathrm {root}\left (12952010752\,a^3\,z^4+31653888\,a^7\,z^4+2162688\,a^8\,z^4+65536\,a^9\,z^4+18119393280\,a\,z^4+20082327552\,a^2\,z^4+1473773568\,a^5\,z^4+5357174784\,a^4\,z^4+269680640\,a^6\,z^4+7247757312\,z^4-8699904\,a^2\,z^2-2842624\,a^3\,z^2-520704\,a^4\,z^2-50688\,a^5\,z^2-2048\,a^6\,z^2-14155776\,a\,z^2-9568256\,z^2+102912\,a^2\,z+17792\,a^3\,z+1152\,a^4\,z+264192\,a\,z+253952\,z-984\,a-57\,a^2+16\,a^3-2064,z,k\right )\,\left (\frac {4096\,a^6+90112\,a^5+823296\,a^4+3997696\,a^3+10878976\,a^2+15728640\,a+9437184}{64\,\left (a^5+18\,a^4+129\,a^3+460\,a^2+816\,a+576\right )}-\frac {x\,\left (1024\,a^6+22528\,a^5+205824\,a^4+999424\,a^3+2719744\,a^2+3932160\,a+2359296\right )}{16\,\left (a^5+18\,a^4+129\,a^3+460\,a^2+816\,a+576\right )}\right )-\frac {1280\,a^5+23552\,a^4+172800\,a^3+631808\,a^2+1150976\,a+835584}{64\,\left (a^5+18\,a^4+129\,a^3+460\,a^2+816\,a+576\right )}+\frac {x\,\left (128\,a^5+2304\,a^4+16512\,a^3+58880\,a^2+104448\,a+73728\right )}{16\,\left (a^5+18\,a^4+129\,a^3+460\,a^2+816\,a+576\right )}\right )-\frac {x\,\left (20\,a^3+228\,a^2+864\,a+1088\right )}{16\,\left (a^5+18\,a^4+129\,a^3+460\,a^2+816\,a+576\right )}\right )+\frac {4\,a^2+35\,a+68}{64\,\left (a^5+18\,a^4+129\,a^3+460\,a^2+816\,a+576\right )}+\frac {x\,\left (2\,a^2+9\,a+8\right )}{16\,\left (a^5+18\,a^4+129\,a^3+460\,a^2+816\,a+576\right )}\right )\,\mathrm {root}\left (12952010752\,a^3\,z^4+31653888\,a^7\,z^4+2162688\,a^8\,z^4+65536\,a^9\,z^4+18119393280\,a\,z^4+20082327552\,a^2\,z^4+1473773568\,a^5\,z^4+5357174784\,a^4\,z^4+269680640\,a^6\,z^4+7247757312\,z^4-8699904\,a^2\,z^2-2842624\,a^3\,z^2-520704\,a^4\,z^2-50688\,a^5\,z^2-2048\,a^6\,z^2-14155776\,a\,z^2-9568256\,z^2+102912\,a^2\,z+17792\,a^3\,z+1152\,a^4\,z+264192\,a\,z+253952\,z-984\,a-57\,a^2+16\,a^3-2064,z,k\right )\right )+\frac {\frac {x^3}{4\,\left (a^2+7\,a+12\right )}+\frac {a}{4\,\left (a+3\right )\,\left (a+4\right )}-\frac {x\,\left (a-2\right )}{4\,\left (a+3\right )\,\left (a+4\right )}+\frac {a\,x^2}{4\,\left (a+3\right )\,\left (a+4\right )}}{-x^4+4\,x^3-8\,x^2+8\,x+a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________