3.4.9 \(\int \frac {x^3+e^x (-56 x+56 x^2-27 x^3-14 x^4)+e^{2 x} (32-40 x+16 x^2+12 x^3-6 x^4-2 x^5)}{2 x^3} \, dx\)

Optimal. Leaf size=34 \[ \frac {1}{e^3}+\frac {1}{2} \left (e^x-\left (7-e^x \left (-1+\frac {4}{x}-x\right )\right )^2+x\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.33, antiderivative size = 76, normalized size of antiderivative = 2.24, number of steps used = 25, number of rules used = 7, integrand size = 65, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.108, Rules used = {12, 14, 2199, 2194, 2177, 2178, 2176} \begin {gather*} -\frac {1}{2} e^{2 x} x^2-\frac {8 e^{2 x}}{x^2}-7 e^x x-e^{2 x} x+\frac {x}{2}-\frac {13 e^x}{2}+\frac {7 e^{2 x}}{2}+\frac {28 e^x}{x}+\frac {4 e^{2 x}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^3 + E^x*(-56*x + 56*x^2 - 27*x^3 - 14*x^4) + E^(2*x)*(32 - 40*x + 16*x^2 + 12*x^3 - 6*x^4 - 2*x^5))/(2*
x^3),x]

[Out]

(-13*E^x)/2 + (7*E^(2*x))/2 - (8*E^(2*x))/x^2 + (28*E^x)/x + (4*E^(2*x))/x + x/2 - 7*E^x*x - E^(2*x)*x - (E^(2
*x)*x^2)/2

Rule 12

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

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), 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] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

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 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \frac {x^3+e^x \left (-56 x+56 x^2-27 x^3-14 x^4\right )+e^{2 x} \left (32-40 x+16 x^2+12 x^3-6 x^4-2 x^5\right )}{x^3} \, dx\\ &=\frac {1}{2} \int \left (1-\frac {2 e^{2 x} \left (-4+x+x^2\right ) \left (4-4 x+2 x^2+x^3\right )}{x^3}-\frac {e^x \left (56-56 x+27 x^2+14 x^3\right )}{x^2}\right ) \, dx\\ &=\frac {x}{2}-\frac {1}{2} \int \frac {e^x \left (56-56 x+27 x^2+14 x^3\right )}{x^2} \, dx-\int \frac {e^{2 x} \left (-4+x+x^2\right ) \left (4-4 x+2 x^2+x^3\right )}{x^3} \, dx\\ &=\frac {x}{2}-\frac {1}{2} \int \left (27 e^x+\frac {56 e^x}{x^2}-\frac {56 e^x}{x}+14 e^x x\right ) \, dx-\int \left (-6 e^{2 x}-\frac {16 e^{2 x}}{x^3}+\frac {20 e^{2 x}}{x^2}-\frac {8 e^{2 x}}{x}+3 e^{2 x} x+e^{2 x} x^2\right ) \, dx\\ &=\frac {x}{2}-3 \int e^{2 x} x \, dx+6 \int e^{2 x} \, dx-7 \int e^x x \, dx+8 \int \frac {e^{2 x}}{x} \, dx-\frac {27 \int e^x \, dx}{2}+16 \int \frac {e^{2 x}}{x^3} \, dx-20 \int \frac {e^{2 x}}{x^2} \, dx-28 \int \frac {e^x}{x^2} \, dx+28 \int \frac {e^x}{x} \, dx-\int e^{2 x} x^2 \, dx\\ &=-\frac {27 e^x}{2}+3 e^{2 x}-\frac {8 e^{2 x}}{x^2}+\frac {28 e^x}{x}+\frac {20 e^{2 x}}{x}+\frac {x}{2}-7 e^x x-\frac {3}{2} e^{2 x} x-\frac {1}{2} e^{2 x} x^2+28 \text {Ei}(x)+8 \text {Ei}(2 x)+\frac {3}{2} \int e^{2 x} \, dx+7 \int e^x \, dx+16 \int \frac {e^{2 x}}{x^2} \, dx-28 \int \frac {e^x}{x} \, dx-40 \int \frac {e^{2 x}}{x} \, dx+\int e^{2 x} x \, dx\\ &=-\frac {13 e^x}{2}+\frac {15 e^{2 x}}{4}-\frac {8 e^{2 x}}{x^2}+\frac {28 e^x}{x}+\frac {4 e^{2 x}}{x}+\frac {x}{2}-7 e^x x-e^{2 x} x-\frac {1}{2} e^{2 x} x^2-32 \text {Ei}(2 x)-\frac {1}{2} \int e^{2 x} \, dx+32 \int \frac {e^{2 x}}{x} \, dx\\ &=-\frac {13 e^x}{2}+\frac {7 e^{2 x}}{2}-\frac {8 e^{2 x}}{x^2}+\frac {28 e^x}{x}+\frac {4 e^{2 x}}{x}+\frac {x}{2}-7 e^x x-e^{2 x} x-\frac {1}{2} e^{2 x} x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 42, normalized size = 1.24 \begin {gather*} \frac {x^3-e^{2 x} \left (-4+x+x^2\right )^2-e^x x \left (-56+13 x+14 x^2\right )}{2 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^3 + E^x*(-56*x + 56*x^2 - 27*x^3 - 14*x^4) + E^(2*x)*(32 - 40*x + 16*x^2 + 12*x^3 - 6*x^4 - 2*x^5
))/(2*x^3),x]

[Out]

(x^3 - E^(2*x)*(-4 + x + x^2)^2 - E^x*x*(-56 + 13*x + 14*x^2))/(2*x^2)

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 51, normalized size = 1.50 \begin {gather*} \frac {x^{3} - {\left (x^{4} + 2 \, x^{3} - 7 \, x^{2} - 8 \, x + 16\right )} e^{\left (2 \, x\right )} - {\left (14 \, x^{3} + 13 \, x^{2} - 56 \, x\right )} e^{x}}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*((-2*x^5-6*x^4+12*x^3+16*x^2-40*x+32)*exp(x)^2+(-14*x^4-27*x^3+56*x^2-56*x)*exp(x)+x^3)/x^3,x, a
lgorithm="fricas")

[Out]

1/2*(x^3 - (x^4 + 2*x^3 - 7*x^2 - 8*x + 16)*e^(2*x) - (14*x^3 + 13*x^2 - 56*x)*e^x)/x^2

________________________________________________________________________________________

giac [B]  time = 0.44, size = 69, normalized size = 2.03 \begin {gather*} -\frac {x^{4} e^{\left (2 \, x\right )} + 2 \, x^{3} e^{\left (2 \, x\right )} + 14 \, x^{3} e^{x} - x^{3} - 7 \, x^{2} e^{\left (2 \, x\right )} + 13 \, x^{2} e^{x} - 8 \, x e^{\left (2 \, x\right )} - 56 \, x e^{x} + 16 \, e^{\left (2 \, x\right )}}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*((-2*x^5-6*x^4+12*x^3+16*x^2-40*x+32)*exp(x)^2+(-14*x^4-27*x^3+56*x^2-56*x)*exp(x)+x^3)/x^3,x, a
lgorithm="giac")

[Out]

-1/2*(x^4*e^(2*x) + 2*x^3*e^(2*x) + 14*x^3*e^x - x^3 - 7*x^2*e^(2*x) + 13*x^2*e^x - 8*x*e^(2*x) - 56*x*e^x + 1
6*e^(2*x))/x^2

________________________________________________________________________________________

maple [A]  time = 0.10, size = 49, normalized size = 1.44




method result size



risch \(\frac {x}{2}-\frac {\left (x^{4}+2 x^{3}-7 x^{2}-8 x +16\right ) {\mathrm e}^{2 x}}{2 x^{2}}-\frac {\left (14 x^{2}+13 x -56\right ) {\mathrm e}^{x}}{2 x}\) \(49\)
default \(\frac {x}{2}+\frac {7 \,{\mathrm e}^{2 x}}{2}-\frac {8 \,{\mathrm e}^{2 x}}{x^{2}}+\frac {4 \,{\mathrm e}^{2 x}}{x}-x \,{\mathrm e}^{2 x}+\frac {28 \,{\mathrm e}^{x}}{x}-7 \,{\mathrm e}^{x} x -\frac {13 \,{\mathrm e}^{x}}{2}-\frac {{\mathrm e}^{2 x} x^{2}}{2}\) \(61\)
norman \(\frac {\frac {x^{3}}{2}-8 \,{\mathrm e}^{2 x}+4 x \,{\mathrm e}^{2 x}+28 \,{\mathrm e}^{x} x -\frac {13 \,{\mathrm e}^{x} x^{2}}{2}-7 \,{\mathrm e}^{x} x^{3}+\frac {7 \,{\mathrm e}^{2 x} x^{2}}{2}-{\mathrm e}^{2 x} x^{3}-\frac {{\mathrm e}^{2 x} x^{4}}{2}}{x^{2}}\) \(70\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/2*((-2*x^5-6*x^4+12*x^3+16*x^2-40*x+32)*exp(x)^2+(-14*x^4-27*x^3+56*x^2-56*x)*exp(x)+x^3)/x^3,x,method=_
RETURNVERBOSE)

[Out]

1/2*x-1/2*(x^4+2*x^3-7*x^2-8*x+16)/x^2*exp(2*x)-1/2*(14*x^2+13*x-56)/x*exp(x)

________________________________________________________________________________________

maxima [C]  time = 0.54, size = 79, normalized size = 2.32 \begin {gather*} -\frac {1}{4} \, {\left (2 \, x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x\right )} - \frac {3}{4} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} - 7 \, {\left (x - 1\right )} e^{x} + \frac {1}{2} \, x + 8 \, {\rm Ei}\left (2 \, x\right ) + 28 \, {\rm Ei}\relax (x) + 3 \, e^{\left (2 \, x\right )} - \frac {27}{2} \, e^{x} - 28 \, \Gamma \left (-1, -x\right ) - 40 \, \Gamma \left (-1, -2 \, x\right ) - 64 \, \Gamma \left (-2, -2 \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*((-2*x^5-6*x^4+12*x^3+16*x^2-40*x+32)*exp(x)^2+(-14*x^4-27*x^3+56*x^2-56*x)*exp(x)+x^3)/x^3,x, a
lgorithm="maxima")

[Out]

-1/4*(2*x^2 - 2*x + 1)*e^(2*x) - 3/4*(2*x - 1)*e^(2*x) - 7*(x - 1)*e^x + 1/2*x + 8*Ei(2*x) + 28*Ei(x) + 3*e^(2
*x) - 27/2*e^x - 28*gamma(-1, -x) - 40*gamma(-1, -2*x) - 64*gamma(-2, -2*x)

________________________________________________________________________________________

mupad [B]  time = 0.38, size = 59, normalized size = 1.74 \begin {gather*} \frac {7\,{\mathrm {e}}^{2\,x}}{2}-\frac {13\,{\mathrm {e}}^x}{2}-\frac {8\,{\mathrm {e}}^{2\,x}-x\,\left (4\,{\mathrm {e}}^{2\,x}+28\,{\mathrm {e}}^x\right )}{x^2}-\frac {x^2\,{\mathrm {e}}^{2\,x}}{2}-x\,\left ({\mathrm {e}}^{2\,x}+7\,{\mathrm {e}}^x-\frac {1}{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-((exp(x)*(56*x - 56*x^2 + 27*x^3 + 14*x^4))/2 + (exp(2*x)*(40*x - 16*x^2 - 12*x^3 + 6*x^4 + 2*x^5 - 32))/
2 - x^3/2)/x^3,x)

[Out]

(7*exp(2*x))/2 - (13*exp(x))/2 - (8*exp(2*x) - x*(4*exp(2*x) + 28*exp(x)))/x^2 - (x^2*exp(2*x))/2 - x*(exp(2*x
) + 7*exp(x) - 1/2)

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 54, normalized size = 1.59 \begin {gather*} \frac {x}{2} + \frac {\left (- 28 x^{4} - 26 x^{3} + 112 x^{2}\right ) e^{x} + \left (- 2 x^{5} - 4 x^{4} + 14 x^{3} + 16 x^{2} - 32 x\right ) e^{2 x}}{4 x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*((-2*x**5-6*x**4+12*x**3+16*x**2-40*x+32)*exp(x)**2+(-14*x**4-27*x**3+56*x**2-56*x)*exp(x)+x**3)
/x**3,x)

[Out]

x/2 + ((-28*x**4 - 26*x**3 + 112*x**2)*exp(x) + (-2*x**5 - 4*x**4 + 14*x**3 + 16*x**2 - 32*x)*exp(2*x))/(4*x**
3)

________________________________________________________________________________________