Optimal. Leaf size=22 \[ 2-\frac {4}{(-7+x) \left (e^4+\left (20+x^2\right )^2\right )} \]
________________________________________________________________________________________
Rubi [C] time = 1.25, antiderivative size = 259, normalized size of antiderivative = 11.77, number of steps used = 31, number of rules used = 12, integrand size = 122, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {2074, 1673, 1178, 1169, 634, 618, 204, 628, 1247, 638, 12, 1107} \begin {gather*} \frac {4 x \left (x^2+89\right )}{\left (4761+e^4\right ) \left (x^4+40 x^2+e^4+400\right )}+\frac {28 \left (x^2+89\right )}{\left (4761+e^4\right ) \left (x^4+40 x^2+e^4+400\right )}+\frac {4}{\left (4761+e^4\right ) (7-x)}-\frac {\sqrt {2} \left (\sqrt {\sqrt {400+e^4}-20}+187 \sqrt {\frac {\sqrt {400+e^4}-20}{400+e^4}}\right ) \tan ^{-1}\left (\frac {2 x+\sqrt {2 \left (\sqrt {400+e^4}-20\right )}}{\sqrt {2 \left (20+\sqrt {400+e^4}\right )}}\right )}{e^2 \left (4761+e^4\right )}+\frac {\sqrt {\frac {2}{\left (400+e^4\right ) \left (20+\sqrt {400+e^4}\right )}} \left (187+\sqrt {400+e^4}\right ) \tan ^{-1}\left (\frac {2 x+\sqrt {2 \left (\sqrt {400+e^4}-20\right )}}{\sqrt {2 \left (20+\sqrt {400+e^4}\right )}}\right )}{4761+e^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 204
Rule 618
Rule 628
Rule 634
Rule 638
Rule 1107
Rule 1169
Rule 1178
Rule 1247
Rule 1673
Rule 2074
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {4}{\left (4761+e^4\right ) (-7+x)^2}+\frac {16 \left (69 \left (400+e^4\right )-7 \left (1380-e^4\right ) x+\left (1380+e^4\right ) x^2-483 x^3\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )^2}-\frac {4 \left (187+14 x+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}\right ) \, dx\\ &=\frac {4}{\left (4761+e^4\right ) (7-x)}-\frac {4 \int \frac {187+14 x+x^2}{400+e^4+40 x^2+x^4} \, dx}{4761+e^4}+\frac {16 \int \frac {69 \left (400+e^4\right )-7 \left (1380-e^4\right ) x+\left (1380+e^4\right ) x^2-483 x^3}{\left (400+e^4+40 x^2+x^4\right )^2} \, dx}{4761+e^4}\\ &=\frac {4}{\left (4761+e^4\right ) (7-x)}-\frac {4 \int \frac {14 x}{400+e^4+40 x^2+x^4} \, dx}{4761+e^4}-\frac {4 \int \frac {187+x^2}{400+e^4+40 x^2+x^4} \, dx}{4761+e^4}+\frac {16 \int \frac {x \left (-7 \left (1380-e^4\right )-483 x^2\right )}{\left (400+e^4+40 x^2+x^4\right )^2} \, dx}{4761+e^4}+\frac {16 \int \frac {69 \left (400+e^4\right )+\left (1380+e^4\right ) x^2}{\left (400+e^4+40 x^2+x^4\right )^2} \, dx}{4761+e^4}\\ &=\frac {4}{\left (4761+e^4\right ) (7-x)}+\frac {4 x \left (89+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}+\frac {8 \operatorname {Subst}\left (\int \frac {-7 \left (1380-e^4\right )-483 x}{\left (400+e^4+40 x+x^2\right )^2} \, dx,x,x^2\right )}{4761+e^4}-\frac {56 \int \frac {x}{400+e^4+40 x^2+x^4} \, dx}{4761+e^4}+\frac {2 \int \frac {374 e^4 \left (400+e^4\right )+2 e^4 \left (400+e^4\right ) x^2}{400+e^4+40 x^2+x^4} \, dx}{e^4 \left (400+e^4\right ) \left (4761+e^4\right )}-\frac {\sqrt {\frac {2}{\left (400+e^4\right ) \left (-20+\sqrt {400+e^4}\right )}} \int \frac {187 \sqrt {2 \left (-20+\sqrt {400+e^4}\right )}-\left (187-\sqrt {400+e^4}\right ) x}{\sqrt {400+e^4}-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{4761+e^4}-\frac {\sqrt {\frac {2}{\left (400+e^4\right ) \left (-20+\sqrt {400+e^4}\right )}} \int \frac {187 \sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+\left (187-\sqrt {400+e^4}\right ) x}{\sqrt {400+e^4}+\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{4761+e^4}\\ &=\frac {4}{\left (4761+e^4\right ) (7-x)}+\frac {28 \left (89+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}+\frac {4 x \left (89+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}-\frac {\left (1+\frac {187}{\sqrt {400+e^4}}\right ) \int \frac {1}{\sqrt {400+e^4}-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{4761+e^4}-\frac {\left (1+\frac {187}{\sqrt {400+e^4}}\right ) \int \frac {1}{\sqrt {400+e^4}+\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{4761+e^4}+\frac {\int \frac {374 e^4 \left (400+e^4\right ) \sqrt {2 \left (-20+\sqrt {400+e^4}\right )}-\left (374 e^4 \left (400+e^4\right )-2 e^4 \left (400+e^4\right )^{3/2}\right ) x}{\sqrt {400+e^4}-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{e^4 \left (400+e^4\right )^{3/2} \left (4761+e^4\right ) \sqrt {2 \left (-20+\sqrt {400+e^4}\right )}}+\frac {\int \frac {374 e^4 \left (400+e^4\right ) \sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+\left (374 e^4 \left (400+e^4\right )-2 e^4 \left (400+e^4\right )^{3/2}\right ) x}{\sqrt {400+e^4}+\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{e^4 \left (400+e^4\right )^{3/2} \left (4761+e^4\right ) \sqrt {2 \left (-20+\sqrt {400+e^4}\right )}}+\frac {\left (187-\sqrt {400+e^4}\right ) \int \frac {-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+2 x}{\sqrt {400+e^4}-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{\left (4761+e^4\right ) \sqrt {2 \left (400+e^4\right ) \left (-20+\sqrt {400+e^4}\right )}}-\frac {\left (187-\sqrt {400+e^4}\right ) \int \frac {\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+2 x}{\sqrt {400+e^4}+\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{\left (4761+e^4\right ) \sqrt {2 \left (400+e^4\right ) \left (-20+\sqrt {400+e^4}\right )}}\\ &=\frac {4}{\left (4761+e^4\right ) (7-x)}+\frac {28 \left (89+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}+\frac {4 x \left (89+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}+\frac {\left (187-\sqrt {400+e^4}\right ) \log \left (\sqrt {400+e^4}-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2\right )}{\left (4761+e^4\right ) \sqrt {2 \left (400+e^4\right ) \left (-20+\sqrt {400+e^4}\right )}}-\frac {\left (187-\sqrt {400+e^4}\right ) \log \left (\sqrt {400+e^4}+\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2\right )}{\left (4761+e^4\right ) \sqrt {2 \left (400+e^4\right ) \left (-20+\sqrt {400+e^4}\right )}}+\frac {\left (1+\frac {187}{\sqrt {400+e^4}}\right ) \int \frac {1}{\sqrt {400+e^4}-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{4761+e^4}+\frac {\left (1+\frac {187}{\sqrt {400+e^4}}\right ) \int \frac {1}{\sqrt {400+e^4}+\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{4761+e^4}+\frac {\left (2 \left (1+\frac {187}{\sqrt {400+e^4}}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-2 \left (20+\sqrt {400+e^4}\right )-x^2} \, dx,x,-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+2 x\right )}{4761+e^4}+\frac {\left (2 \left (1+\frac {187}{\sqrt {400+e^4}}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-2 \left (20+\sqrt {400+e^4}\right )-x^2} \, dx,x,\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+2 x\right )}{4761+e^4}-\frac {\left (187-\sqrt {400+e^4}\right ) \int \frac {-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+2 x}{\sqrt {400+e^4}-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{\left (4761+e^4\right ) \sqrt {2 \left (400+e^4\right ) \left (-20+\sqrt {400+e^4}\right )}}+\frac {\left (187-\sqrt {400+e^4}\right ) \int \frac {\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+2 x}{\sqrt {400+e^4}+\sqrt {2 \left (-20+\sqrt {400+e^4}\right )} x+x^2} \, dx}{\left (4761+e^4\right ) \sqrt {2 \left (400+e^4\right ) \left (-20+\sqrt {400+e^4}\right )}}\\ &=\frac {4}{\left (4761+e^4\right ) (7-x)}+\frac {28 \left (89+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}+\frac {4 x \left (89+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}+\frac {\left (1+\frac {187}{\sqrt {400+e^4}}\right ) \sqrt {\frac {2}{20+\sqrt {400+e^4}}} \tan ^{-1}\left (\frac {\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}-2 x}{\sqrt {2 \left (20+\sqrt {400+e^4}\right )}}\right )}{4761+e^4}-\frac {\left (1+\frac {187}{\sqrt {400+e^4}}\right ) \sqrt {\frac {2}{20+\sqrt {400+e^4}}} \tan ^{-1}\left (\frac {\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+2 x}{\sqrt {2 \left (20+\sqrt {400+e^4}\right )}}\right )}{4761+e^4}-\frac {\left (2 \left (1+\frac {187}{\sqrt {400+e^4}}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-2 \left (20+\sqrt {400+e^4}\right )-x^2} \, dx,x,-\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+2 x\right )}{4761+e^4}-\frac {\left (2 \left (1+\frac {187}{\sqrt {400+e^4}}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-2 \left (20+\sqrt {400+e^4}\right )-x^2} \, dx,x,\sqrt {2 \left (-20+\sqrt {400+e^4}\right )}+2 x\right )}{4761+e^4}\\ &=\frac {4}{\left (4761+e^4\right ) (7-x)}+\frac {28 \left (89+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}+\frac {4 x \left (89+x^2\right )}{\left (4761+e^4\right ) \left (400+e^4+40 x^2+x^4\right )}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 20, normalized size = 0.91 \begin {gather*} -\frac {4}{(-7+x) \left (e^4+\left (20+x^2\right )^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 33, normalized size = 1.50 \begin {gather*} -\frac {4}{x^{5} - 7 \, x^{4} + 40 \, x^{3} - 280 \, x^{2} + {\left (x - 7\right )} e^{4} + 400 \, x - 2800} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [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]
________________________________________________________________________________________
maple [A] time = 0.22, size = 22, normalized size = 1.00
method | result | size |
norman | \(-\frac {4}{\left (x -7\right ) \left (x^{4}+40 x^{2}+{\mathrm e}^{4}+400\right )}\) | \(22\) |
gosper | \(-\frac {4}{x^{5}-7 x^{4}+40 x^{3}+x \,{\mathrm e}^{4}-280 x^{2}-7 \,{\mathrm e}^{4}+400 x -2800}\) | \(36\) |
risch | \(-\frac {4}{x^{5}-7 x^{4}+40 x^{3}+x \,{\mathrm e}^{4}-280 x^{2}-7 \,{\mathrm e}^{4}+400 x -2800}\) | \(36\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.36, size = 34, normalized size = 1.55 \begin {gather*} -\frac {4}{x^{5} - 7 \, x^{4} + 40 \, x^{3} - 280 \, x^{2} + x {\left (e^{4} + 400\right )} - 7 \, e^{4} - 2800} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.29, size = 21, normalized size = 0.95 \begin {gather*} -\frac {4}{\left (x-7\right )\,\left (x^4+40\,x^2+{\mathrm {e}}^4+400\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 3.28, size = 34, normalized size = 1.55 \begin {gather*} - \frac {4}{x^{5} - 7 x^{4} + 40 x^{3} - 280 x^{2} + x \left (e^{4} + 400\right ) - 2800 - 7 e^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________