3.34.85 \(\int \frac {e^x (16+24 x+e^4 x+12 x^2+2 x^3+(-8-20 x-18 x^2-7 x^3-x^4) \log (7))}{8+12 x+6 x^2+x^3} \, dx\) [3385]

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

[Out]

exp(x)*((exp(2)^2/(2+x)^2/x-ln(7))*x+2)-3

________________________________________________________________________________________

Rubi [A]
time = 0.19, antiderivative size = 36, normalized size of antiderivative = 1.33, number of steps used = 11, number of rules used = 6, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {6, 2230, 2208, 2209, 2207, 2225} \begin {gather*} \frac {e^{x+4}}{(x+2)^2}-e^x (x+2) \log (7)+e^x (2+\log (7))+e^x \log (7) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^x*(16 + 24*x + E^4*x + 12*x^2 + 2*x^3 + (-8 - 20*x - 18*x^2 - 7*x^3 - x^4)*Log[7]))/(8 + 12*x + 6*x^2 +
 x^3),x]

[Out]

E^(4 + x)/(2 + x)^2 + E^x*Log[7] - E^x*(2 + x)*Log[7] + E^x*(2 + Log[7])

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 2207

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] &&  !TrueQ[$UseGamma]

Rule 2208

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] &&  !TrueQ[$UseGamm
a]

Rule 2209

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

Rule 2225

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 2230

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] &&  !TrueQ[$UseGamma]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^x \left (16+\left (24+e^4\right ) x+12 x^2+2 x^3+\left (-8-20 x-18 x^2-7 x^3-x^4\right ) \log (7)\right )}{8+12 x+6 x^2+x^3} \, dx\\ &=\int \left (-\frac {2 e^{4+x}}{(2+x)^3}+\frac {e^{4+x}}{(2+x)^2}-e^x (2+x) \log (7)+e^x (2+\log (7))\right ) \, dx\\ &=-\left (2 \int \frac {e^{4+x}}{(2+x)^3} \, dx\right )-\log (7) \int e^x (2+x) \, dx+(2+\log (7)) \int e^x \, dx+\int \frac {e^{4+x}}{(2+x)^2} \, dx\\ &=\frac {e^{4+x}}{(2+x)^2}-\frac {e^{4+x}}{2+x}-e^x (2+x) \log (7)+e^x (2+\log (7))+\log (7) \int e^x \, dx-\int \frac {e^{4+x}}{(2+x)^2} \, dx+\int \frac {e^{4+x}}{2+x} \, dx\\ &=\frac {e^{4+x}}{(2+x)^2}+e^2 \text {Ei}(2+x)+e^x \log (7)-e^x (2+x) \log (7)+e^x (2+\log (7))-\int \frac {e^{4+x}}{2+x} \, dx\\ &=\frac {e^{4+x}}{(2+x)^2}+e^x \log (7)-e^x (2+x) \log (7)+e^x (2+\log (7))\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.32, size = 37, normalized size = 1.37 \begin {gather*} -\frac {e^x \left (-8-e^4+x^3 \log (7)+x (-8+\log (2401))+x^2 (-2+\log (2401))\right )}{(2+x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^x*(16 + 24*x + E^4*x + 12*x^2 + 2*x^3 + (-8 - 20*x - 18*x^2 - 7*x^3 - x^4)*Log[7]))/(8 + 12*x + 6
*x^2 + x^3),x]

[Out]

-((E^x*(-8 - E^4 + x^3*Log[7] + x*(-8 + Log[2401]) + x^2*(-2 + Log[2401])))/(2 + x)^2)

________________________________________________________________________________________

Maple [A]
time = 0.15, size = 25, normalized size = 0.93

method result size
default \(\frac {{\mathrm e}^{4} {\mathrm e}^{x}}{\left (2+x \right )^{2}}+2 \,{\mathrm e}^{x}-{\mathrm e}^{x} x \ln \left (7\right )\) \(25\)
risch \(\frac {\left (-\ln \left (7\right ) x^{3}-4 x^{2} \ln \left (7\right )+{\mathrm e}^{4}-4 x \ln \left (7\right )+2 x^{2}+8 x +8\right ) {\mathrm e}^{x}}{\left (2+x \right )^{2}}\) \(40\)
gosper \(\frac {\left (-\ln \left (7\right ) x^{3}-4 x^{2} \ln \left (7\right )+{\mathrm e}^{4}-4 x \ln \left (7\right )+2 x^{2}+8 x +8\right ) {\mathrm e}^{x}}{x^{2}+4 x +4}\) \(47\)
norman \(\frac {\left ({\mathrm e}^{4}+8\right ) {\mathrm e}^{x}+\left (-4 \ln \left (7\right )+2\right ) x^{2} {\mathrm e}^{x}+\left (-4 \ln \left (7\right )+8\right ) x \,{\mathrm e}^{x}-\ln \left (7\right ) x^{3} {\mathrm e}^{x}}{\left (2+x \right )^{2}}\) \(48\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-x^4-7*x^3-18*x^2-20*x-8)*ln(7)+x*exp(2)^2+2*x^3+12*x^2+24*x+16)*exp(x)/(x^3+6*x^2+12*x+8),x,method=_RET
URNVERBOSE)

[Out]

exp(2)^2*exp(x)/(2+x)^2+2*exp(x)-exp(x)*x*ln(7)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^4-7*x^3-18*x^2-20*x-8)*log(7)+x*exp(2)^2+2*x^3+12*x^2+24*x+16)*exp(x)/(x^3+6*x^2+12*x+8),x, alg
orithm="maxima")

[Out]

-(x^4*log(7) + 2*x^3*(3*log(7) - 1) + 12*x^2*(log(7) - 1) - x*(e^4 + 12*log(7)))*e^x/(x^3 + 6*x^2 + 12*x + 8)
- 20*e^x*log(7)/(x^2 + 4*x + 4) + 8*e^(-2)*exp_integral_e(3, -x - 2)*log(7)/(x + 2)^2 + 24*e^x/(x^2 + 4*x + 4)
 - 16*e^(-2)*exp_integral_e(3, -x - 2)/(x + 2)^2 + integrate(2*(x*(e^4 + 24*log(7) - 24) - e^4 - 12*log(7))*e^
x/(x^4 + 8*x^3 + 24*x^2 + 32*x + 16), x)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 41, normalized size = 1.52 \begin {gather*} \frac {{\left (2 \, x^{2} - {\left (x^{3} + 4 \, x^{2} + 4 \, x\right )} \log \left (7\right ) + 8 \, x + e^{4} + 8\right )} e^{x}}{x^{2} + 4 \, x + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^4-7*x^3-18*x^2-20*x-8)*log(7)+x*exp(2)^2+2*x^3+12*x^2+24*x+16)*exp(x)/(x^3+6*x^2+12*x+8),x, alg
orithm="fricas")

[Out]

(2*x^2 - (x^3 + 4*x^2 + 4*x)*log(7) + 8*x + e^4 + 8)*e^x/(x^2 + 4*x + 4)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (20) = 40\).
time = 0.08, size = 46, normalized size = 1.70 \begin {gather*} \frac {\left (- x^{3} \log {\left (7 \right )} - 4 x^{2} \log {\left (7 \right )} + 2 x^{2} - 4 x \log {\left (7 \right )} + 8 x + 8 + e^{4}\right ) e^{x}}{x^{2} + 4 x + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x**4-7*x**3-18*x**2-20*x-8)*ln(7)+x*exp(2)**2+2*x**3+12*x**2+24*x+16)*exp(x)/(x**3+6*x**2+12*x+8)
,x)

[Out]

(-x**3*log(7) - 4*x**2*log(7) + 2*x**2 - 4*x*log(7) + 8*x + 8 + exp(4))*exp(x)/(x**2 + 4*x + 4)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 59 vs. \(2 (25) = 50\).
time = 0.40, size = 59, normalized size = 2.19 \begin {gather*} -\frac {x^{3} e^{x} \log \left (7\right ) + 4 \, x^{2} e^{x} \log \left (7\right ) - 2 \, x^{2} e^{x} + 4 \, x e^{x} \log \left (7\right ) - 8 \, x e^{x} - e^{\left (x + 4\right )} - 8 \, e^{x}}{x^{2} + 4 \, x + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^4-7*x^3-18*x^2-20*x-8)*log(7)+x*exp(2)^2+2*x^3+12*x^2+24*x+16)*exp(x)/(x^3+6*x^2+12*x+8),x, alg
orithm="giac")

[Out]

-(x^3*e^x*log(7) + 4*x^2*e^x*log(7) - 2*x^2*e^x + 4*x*e^x*log(7) - 8*x*e^x - e^(x + 4) - 8*e^x)/(x^2 + 4*x + 4
)

________________________________________________________________________________________

Mupad [B]
time = 2.12, size = 21, normalized size = 0.78 \begin {gather*} \frac {{\mathrm {e}}^{x+4}}{{\left (x+2\right )}^2}-{\mathrm {e}}^x\,\left (x\,\ln \left (7\right )-2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x)*(24*x + x*exp(4) - log(7)*(20*x + 18*x^2 + 7*x^3 + x^4 + 8) + 12*x^2 + 2*x^3 + 16))/(12*x + 6*x^2
+ x^3 + 8),x)

[Out]

exp(x + 4)/(x + 2)^2 - exp(x)*(x*log(7) - 2)

________________________________________________________________________________________