3.7.19 \(\int \frac {588 x-294 x^2+44 x^3-2 x^4+e^{x/2} (-1176+854 x-217 x^2+24 x^3-x^4)}{-432 x^3+216 x^4-36 x^5+2 x^6} \, dx\)

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]

Int[(588*x - 294*x^2 + 44*x^3 - 2*x^4 + E^(x/2)*(-1176 + 854*x - 217*x^2 + 24*x^3 - x^4))/(-432*x^3 + 216*x^4
- 36*x^5 + 2*x^6),x]

[Out]

1/(6*(6 - x)^2) - E^(x/2)/(36*(6 - x)^2) + 13/(36*(6 - x)) - (7*E^(x/2))/(108*(6 - x)) - (49*E^(x/2))/(36*x^2)
 + 49/(36*x) - (7*E^(x/2))/(108*x)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1612

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[E
xpandIntegrand[Px*(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && Poly
Q[Px, x] && IntegersQ[m, n]

Rule 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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]

Integrate[(588*x - 294*x^2 + 44*x^3 - 2*x^4 + E^(x/2)*(-1176 + 854*x - 217*x^2 + 24*x^3 - x^4))/(-432*x^3 + 21
6*x^4 - 36*x^5 + 2*x^6),x]

[Out]

-(((E^(x/2) - x)*(-7 + x)^2)/((-6 + x)^2*x^2))

________________________________________________________________________________________

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]

integrate(((-x^4+24*x^3-217*x^2+854*x-1176)*exp(1/2*x)-2*x^4+44*x^3-294*x^2+588*x)/(2*x^6-36*x^5+216*x^4-432*x
^3),x, algorithm="fricas")

[Out]

(x^3 - 14*x^2 - (x^2 - 14*x + 49)*e^(1/2*x) + 49*x)/(x^4 - 12*x^3 + 36*x^2)

________________________________________________________________________________________

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]

integrate(((-x^4+24*x^3-217*x^2+854*x-1176)*exp(1/2*x)-2*x^4+44*x^3-294*x^2+588*x)/(2*x^6-36*x^5+216*x^4-432*x
^3),x, algorithm="giac")

[Out]

(x^3 - x^2*e^(1/2*x) - 14*x^2 + 14*x*e^(1/2*x) + 49*x - 49*e^(1/2*x))/(x^4 - 12*x^3 + 36*x^2)

________________________________________________________________________________________

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]

int(((-x^4+24*x^3-217*x^2+854*x-1176)*exp(1/2*x)-2*x^4+44*x^3-294*x^2+588*x)/(2*x^6-36*x^5+216*x^4-432*x^3),x,
method=_RETURNVERBOSE)

[Out]

(-14*x^2+x^3+49*x+14*x*exp(1/2*x)-x^2*exp(1/2*x)-49*exp(1/2*x))/x^2/(x-6)^2

________________________________________________________________________________________

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]

integrate(((-x^4+24*x^3-217*x^2+854*x-1176)*exp(1/2*x)-2*x^4+44*x^3-294*x^2+588*x)/(2*x^6-36*x^5+216*x^4-432*x
^3),x, algorithm="maxima")

[Out]

-(x^2 - 14*x + 49)*e^(1/2*x)/(x^4 - 12*x^3 + 36*x^2) + 49/12*(x^2 - 9*x + 12)/(x^3 - 12*x^2 + 36*x) + (x - 3)/
(x^2 - 12*x + 36) - 49/12*(x - 9)/(x^2 - 12*x + 36) - 11/(x^2 - 12*x + 36)

________________________________________________________________________________________

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]

int((exp(x/2)*(217*x^2 - 854*x - 24*x^3 + x^4 + 1176) - 588*x + 294*x^2 - 44*x^3 + 2*x^4)/(432*x^3 - 216*x^4 +
 36*x^5 - 2*x^6),x)

[Out]

-(49*exp(x/2) - x*(14*exp(x/2) + 49) + x^2*(exp(x/2) + 14) - x^3)/(x^2*(x - 6)^2)

________________________________________________________________________________________

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]

integrate(((-x**4+24*x**3-217*x**2+854*x-1176)*exp(1/2*x)-2*x**4+44*x**3-294*x**2+588*x)/(2*x**6-36*x**5+216*x
**4-432*x**3),x)

[Out]

(-x**2 + 14*x - 49)*exp(x/2)/(x**4 - 12*x**3 + 36*x**2) - (-x**2 + 14*x - 49)/(x**3 - 12*x**2 + 36*x)

________________________________________________________________________________________