3.70.98 \(\int \frac {3-19 x+2 x^2+e^x (-16 x-16 x^2)+e^{2 x} (-4 x-8 x^2)}{3 x} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.05, antiderivative size = 55, normalized size of antiderivative = 2.29, number of steps used = 9, number of rules used = 4, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.089, Rules used = {12, 14, 2176, 2194} \begin {gather*} \frac {x^2}{3}-\frac {19 x}{3}+\frac {16 e^x}{3}+\frac {2 e^{2 x}}{3}-\frac {16}{3} e^x (x+1)-\frac {2}{3} e^{2 x} (2 x+1)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3 - 19*x + 2*x^2 + E^x*(-16*x - 16*x^2) + E^(2*x)*(-4*x - 8*x^2))/(3*x),x]

[Out]

(16*E^x)/3 + (2*E^(2*x))/3 - (19*x)/3 + x^2/3 - (16*E^x*(1 + x))/3 - (2*E^(2*x)*(1 + 2*x))/3 + Log[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 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 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]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{3} \int \frac {3-19 x+2 x^2+e^x \left (-16 x-16 x^2\right )+e^{2 x} \left (-4 x-8 x^2\right )}{x} \, dx\\ &=\frac {1}{3} \int \left (-16 e^x (1+x)-4 e^{2 x} (1+2 x)+\frac {3-19 x+2 x^2}{x}\right ) \, dx\\ &=\frac {1}{3} \int \frac {3-19 x+2 x^2}{x} \, dx-\frac {4}{3} \int e^{2 x} (1+2 x) \, dx-\frac {16}{3} \int e^x (1+x) \, dx\\ &=-\frac {16}{3} e^x (1+x)-\frac {2}{3} e^{2 x} (1+2 x)+\frac {1}{3} \int \left (-19+\frac {3}{x}+2 x\right ) \, dx+\frac {4}{3} \int e^{2 x} \, dx+\frac {16 \int e^x \, dx}{3}\\ &=\frac {16 e^x}{3}+\frac {2 e^{2 x}}{3}-\frac {19 x}{3}+\frac {x^2}{3}-\frac {16}{3} e^x (1+x)-\frac {2}{3} e^{2 x} (1+2 x)+\log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 29, normalized size = 1.21 \begin {gather*} \frac {1}{3} \left (-19 x-16 e^x x-4 e^{2 x} x+x^2+3 \log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3 - 19*x + 2*x^2 + E^x*(-16*x - 16*x^2) + E^(2*x)*(-4*x - 8*x^2))/(3*x),x]

[Out]

(-19*x - 16*E^x*x - 4*E^(2*x)*x + x^2 + 3*Log[x])/3

________________________________________________________________________________________

fricas [A]  time = 1.39, size = 23, normalized size = 0.96 \begin {gather*} \frac {1}{3} \, x^{2} - \frac {4}{3} \, x e^{\left (2 \, x\right )} - \frac {16}{3} \, x e^{x} - \frac {19}{3} \, x + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*((-8*x^2-4*x)*exp(x)^2+(-16*x^2-16*x)*exp(x)+2*x^2-19*x+3)/x,x, algorithm="fricas")

[Out]

1/3*x^2 - 4/3*x*e^(2*x) - 16/3*x*e^x - 19/3*x + log(x)

________________________________________________________________________________________

giac [A]  time = 0.14, size = 23, normalized size = 0.96 \begin {gather*} \frac {1}{3} \, x^{2} - \frac {4}{3} \, x e^{\left (2 \, x\right )} - \frac {16}{3} \, x e^{x} - \frac {19}{3} \, x + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*((-8*x^2-4*x)*exp(x)^2+(-16*x^2-16*x)*exp(x)+2*x^2-19*x+3)/x,x, algorithm="giac")

[Out]

1/3*x^2 - 4/3*x*e^(2*x) - 16/3*x*e^x - 19/3*x + log(x)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 24, normalized size = 1.00




method result size



default \(\frac {x^{2}}{3}-\frac {19 x}{3}+\ln \relax (x )-\frac {4 x \,{\mathrm e}^{2 x}}{3}-\frac {16 \,{\mathrm e}^{x} x}{3}\) \(24\)
norman \(\frac {x^{2}}{3}-\frac {19 x}{3}+\ln \relax (x )-\frac {4 x \,{\mathrm e}^{2 x}}{3}-\frac {16 \,{\mathrm e}^{x} x}{3}\) \(24\)
risch \(\frac {x^{2}}{3}-\frac {19 x}{3}+\ln \relax (x )-\frac {4 x \,{\mathrm e}^{2 x}}{3}-\frac {16 \,{\mathrm e}^{x} x}{3}\) \(24\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/3*((-8*x^2-4*x)*exp(x)^2+(-16*x^2-16*x)*exp(x)+2*x^2-19*x+3)/x,x,method=_RETURNVERBOSE)

[Out]

1/3*x^2-19/3*x+ln(x)-4/3*x*exp(x)^2-16/3*exp(x)*x

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 39, normalized size = 1.62 \begin {gather*} \frac {1}{3} \, x^{2} - \frac {2}{3} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} - \frac {16}{3} \, {\left (x - 1\right )} e^{x} - \frac {19}{3} \, x - \frac {2}{3} \, e^{\left (2 \, x\right )} - \frac {16}{3} \, e^{x} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*((-8*x^2-4*x)*exp(x)^2+(-16*x^2-16*x)*exp(x)+2*x^2-19*x+3)/x,x, algorithm="maxima")

[Out]

1/3*x^2 - 2/3*(2*x - 1)*e^(2*x) - 16/3*(x - 1)*e^x - 19/3*x - 2/3*e^(2*x) - 16/3*e^x + log(x)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 23, normalized size = 0.96 \begin {gather*} \ln \relax (x)-\frac {19\,x}{3}-\frac {4\,x\,{\mathrm {e}}^{2\,x}}{3}-\frac {16\,x\,{\mathrm {e}}^x}{3}+\frac {x^2}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-((19*x)/3 + (exp(2*x)*(4*x + 8*x^2))/3 + (exp(x)*(16*x + 16*x^2))/3 - (2*x^2)/3 - 1)/x,x)

[Out]

log(x) - (19*x)/3 - (4*x*exp(2*x))/3 - (16*x*exp(x))/3 + x^2/3

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 31, normalized size = 1.29 \begin {gather*} \frac {x^{2}}{3} - \frac {4 x e^{2 x}}{3} - \frac {16 x e^{x}}{3} - \frac {19 x}{3} + \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/3*((-8*x**2-4*x)*exp(x)**2+(-16*x**2-16*x)*exp(x)+2*x**2-19*x+3)/x,x)

[Out]

x**2/3 - 4*x*exp(2*x)/3 - 16*x*exp(x)/3 - 19*x/3 + log(x)

________________________________________________________________________________________