Optimal. Leaf size=23 \[ \frac {-e^{x/2}+x}{\left (x+\frac {x}{-7+x}\right )^2} \]
________________________________________________________________________________________
Rubi [B] time = 1.45, antiderivative size = 94, normalized size of antiderivative = 4.09, number of steps used = 20, number of rules used = 6, integrand size = 71, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {6688, 12, 6742, 1612, 2177, 2178} \begin {gather*} -\frac {49 e^{x/2}}{36 x^2}-\frac {7 e^{x/2}}{108 x}+\frac {49}{36 x}-\frac {7 e^{x/2}}{108 (6-x)}+\frac {13}{36 (6-x)}-\frac {e^{x/2}}{36 (6-x)^2}+\frac {1}{6 (6-x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1612
Rule 2177
Rule 2178
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {(7-x) \left (-2 x \left (42-15 x+x^2\right )-e^{x/2} \left (-168+98 x-17 x^2+x^3\right )\right )}{2 (6-x)^3 x^3} \, dx\\ &=\frac {1}{2} \int \frac {(7-x) \left (-2 x \left (42-15 x+x^2\right )-e^{x/2} \left (-168+98 x-17 x^2+x^3\right )\right )}{(6-x)^3 x^3} \, dx\\ &=\frac {1}{2} \int \left (-\frac {2 (-7+x) \left (42-15 x+x^2\right )}{(-6+x)^3 x^2}-\frac {e^{x/2} (-7+x) (-3+x) \left (56-14 x+x^2\right )}{(-6+x)^3 x^3}\right ) \, dx\\ &=-\left (\frac {1}{2} \int \frac {e^{x/2} (-7+x) (-3+x) \left (56-14 x+x^2\right )}{(-6+x)^3 x^3} \, dx\right )-\int \frac {(-7+x) \left (42-15 x+x^2\right )}{(-6+x)^3 x^2} \, dx\\ &=-\left (\frac {1}{2} \int \left (-\frac {e^{x/2}}{9 (-6+x)^3}+\frac {17 e^{x/2}}{108 (-6+x)^2}-\frac {7 e^{x/2}}{108 (-6+x)}-\frac {49 e^{x/2}}{9 x^3}+\frac {133 e^{x/2}}{108 x^2}+\frac {7 e^{x/2}}{108 x}\right ) \, dx\right )-\int \left (\frac {1}{3 (-6+x)^3}-\frac {13}{36 (-6+x)^2}+\frac {49}{36 x^2}\right ) \, dx\\ &=\frac {1}{6 (6-x)^2}+\frac {13}{36 (6-x)}+\frac {49}{36 x}+\frac {7}{216} \int \frac {e^{x/2}}{-6+x} \, dx-\frac {7}{216} \int \frac {e^{x/2}}{x} \, dx+\frac {1}{18} \int \frac {e^{x/2}}{(-6+x)^3} \, dx-\frac {17}{216} \int \frac {e^{x/2}}{(-6+x)^2} \, dx-\frac {133}{216} \int \frac {e^{x/2}}{x^2} \, dx+\frac {49}{18} \int \frac {e^{x/2}}{x^3} \, dx\\ &=\frac {1}{6 (6-x)^2}-\frac {e^{x/2}}{36 (6-x)^2}+\frac {13}{36 (6-x)}-\frac {17 e^{x/2}}{216 (6-x)}-\frac {49 e^{x/2}}{36 x^2}+\frac {49}{36 x}+\frac {133 e^{x/2}}{216 x}+\frac {7}{216} e^3 \text {Ei}\left (\frac {1}{2} (-6+x)\right )-\frac {7 \text {Ei}\left (\frac {x}{2}\right )}{216}+\frac {1}{72} \int \frac {e^{x/2}}{(-6+x)^2} \, dx-\frac {17}{432} \int \frac {e^{x/2}}{-6+x} \, dx-\frac {133}{432} \int \frac {e^{x/2}}{x} \, dx+\frac {49}{72} \int \frac {e^{x/2}}{x^2} \, dx\\ &=\frac {1}{6 (6-x)^2}-\frac {e^{x/2}}{36 (6-x)^2}+\frac {13}{36 (6-x)}-\frac {7 e^{x/2}}{108 (6-x)}-\frac {49 e^{x/2}}{36 x^2}+\frac {49}{36 x}-\frac {7 e^{x/2}}{108 x}-\frac {1}{144} e^3 \text {Ei}\left (\frac {1}{2} (-6+x)\right )-\frac {49 \text {Ei}\left (\frac {x}{2}\right )}{144}+\frac {1}{144} \int \frac {e^{x/2}}{-6+x} \, dx+\frac {49}{144} \int \frac {e^{x/2}}{x} \, dx\\ &=\frac {1}{6 (6-x)^2}-\frac {e^{x/2}}{36 (6-x)^2}+\frac {13}{36 (6-x)}-\frac {7 e^{x/2}}{108 (6-x)}-\frac {49 e^{x/2}}{36 x^2}+\frac {49}{36 x}-\frac {7 e^{x/2}}{108 x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 26, normalized size = 1.13 \begin {gather*} -\frac {\left (e^{x/2}-x\right ) (-7+x)^2}{(-6+x)^2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.59, size = 43, normalized size = 1.87 \begin {gather*} \frac {x^{3} - 14 \, x^{2} - {\left (x^{2} - 14 \, x + 49\right )} e^{\left (\frac {1}{2} \, x\right )} + 49 \, x}{x^{4} - 12 \, x^{3} + 36 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.30, size = 51, normalized size = 2.22 \begin {gather*} \frac {x^{3} - x^{2} e^{\left (\frac {1}{2} \, x\right )} - 14 \, x^{2} + 14 \, x e^{\left (\frac {1}{2} \, x\right )} + 49 \, x - 49 \, e^{\left (\frac {1}{2} \, x\right )}}{x^{4} - 12 \, x^{3} + 36 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.09, size = 44, normalized size = 1.91
method | result | size |
norman | \(\frac {-14 x^{2}+x^{3}+49 x +14 x \,{\mathrm e}^{\frac {x}{2}}-x^{2} {\mathrm e}^{\frac {x}{2}}-49 \,{\mathrm e}^{\frac {x}{2}}}{x^{2} \left (x -6\right )^{2}}\) | \(44\) |
risch | \(\frac {x^{2}-14 x +49}{x \left (x^{2}-12 x +36\right )}-\frac {\left (x^{2}-14 x +49\right ) {\mathrm e}^{\frac {x}{2}}}{x^{2} \left (x -6\right )^{2}}\) | \(46\) |
derivativedivides | \(\frac {49}{36 x}+\frac {1}{24 \left (\frac {x}{2}-3\right )^{2}}-\frac {13}{72 \left (\frac {x}{2}-3\right )}-\frac {{\mathrm e}^{\frac {x}{2}}}{144 \left (\frac {x}{2}-3\right )^{2}}+\frac {7 \,{\mathrm e}^{\frac {x}{2}}}{216 \left (\frac {x}{2}-3\right )}-\frac {49 \,{\mathrm e}^{\frac {x}{2}}}{36 x^{2}}-\frac {7 \,{\mathrm e}^{\frac {x}{2}}}{108 x}\) | \(69\) |
default | \(\frac {49}{36 x}+\frac {1}{24 \left (\frac {x}{2}-3\right )^{2}}-\frac {13}{72 \left (\frac {x}{2}-3\right )}-\frac {{\mathrm e}^{\frac {x}{2}}}{144 \left (\frac {x}{2}-3\right )^{2}}+\frac {7 \,{\mathrm e}^{\frac {x}{2}}}{216 \left (\frac {x}{2}-3\right )}-\frac {49 \,{\mathrm e}^{\frac {x}{2}}}{36 x^{2}}-\frac {7 \,{\mathrm e}^{\frac {x}{2}}}{108 x}\) | \(69\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.74, size = 96, normalized size = 4.17 \begin {gather*} -\frac {{\left (x^{2} - 14 \, x + 49\right )} e^{\left (\frac {1}{2} \, x\right )}}{x^{4} - 12 \, x^{3} + 36 \, x^{2}} + \frac {49 \, {\left (x^{2} - 9 \, x + 12\right )}}{12 \, {\left (x^{3} - 12 \, x^{2} + 36 \, x\right )}} + \frac {x - 3}{x^{2} - 12 \, x + 36} - \frac {49 \, {\left (x - 9\right )}}{12 \, {\left (x^{2} - 12 \, x + 36\right )}} - \frac {11}{x^{2} - 12 \, x + 36} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.67, size = 43, normalized size = 1.87 \begin {gather*} -\frac {49\,{\mathrm {e}}^{x/2}-x\,\left (14\,{\mathrm {e}}^{x/2}+49\right )+x^2\,\left ({\mathrm {e}}^{x/2}+14\right )-x^3}{x^2\,{\left (x-6\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.18, size = 46, normalized size = 2.00 \begin {gather*} \frac {\left (- x^{2} + 14 x - 49\right ) e^{\frac {x}{2}}}{x^{4} - 12 x^{3} + 36 x^{2}} - \frac {- x^{2} + 14 x - 49}{x^{3} - 12 x^{2} + 36 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________