3.77.30 \(\int \frac {-4 x+28 x^2+16 x^3+e^x (-2 x-x^2)+(-12-6 x) \log (x)}{8 x+4 x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.32, antiderivative size = 28, normalized size of antiderivative = 0.97, number of steps used = 7, number of rules used = 5, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.106, Rules used = {1593, 6688, 2194, 698, 2301} \begin {gather*} 2 x^2-x-\frac {e^x}{4}-\frac {3 \log ^2(x)}{4}+\log (x+2) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 698

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 2301

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

Rule 6688

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 32, normalized size = 1.10 \begin {gather*} -\frac {e^x}{4}-9 (2+x)+2 (2+x)^2-\frac {3 \log ^2(x)}{4}+\log (2+x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/4*E^x - 9*(2 + x) + 2*(2 + x)^2 - (3*Log[x]^2)/4 + Log[2 + x]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x-12)*log(x)+(-x^2-2*x)*exp(x)+16*x^3+28*x^2-4*x)/(4*x^2+8*x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x-12)*log(x)+(-x^2-2*x)*exp(x)+16*x^3+28*x^2-4*x)/(4*x^2+8*x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.22, size = 24, normalized size = 0.83




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-6*x-12)*ln(x)+(-x^2-2*x)*exp(x)+16*x^3+28*x^2-4*x)/(4*x^2+8*x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} 2 \, x^{2} + \frac {1}{2} \, e^{\left (-2\right )} E_{1}\left (-x - 2\right ) - \frac {3}{4} \, \log \relax (x)^{2} - x - \frac {1}{4} \, \int \frac {x e^{x}}{x + 2}\,{d x} + \log \left (x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x-12)*log(x)+(-x^2-2*x)*exp(x)+16*x^3+28*x^2-4*x)/(4*x^2+8*x),x, algorithm="maxima")

[Out]

2*x^2 + 1/2*e^(-2)*exp_integral_e(1, -x - 2) - 3/4*log(x)^2 - x - 1/4*integrate(x*e^x/(x + 2), x) + log(x + 2)

________________________________________________________________________________________

mupad [B]  time = 4.72, size = 23, normalized size = 0.79 \begin {gather*} \ln \left (x+2\right )-x-\frac {{\mathrm {e}}^x}{4}-\frac {3\,{\ln \relax (x)}^2}{4}+2\,x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(4*x + exp(x)*(2*x + x^2) + log(x)*(6*x + 12) - 28*x^2 - 16*x^3)/(8*x + 4*x^2),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.36, size = 24, normalized size = 0.83 \begin {gather*} 2 x^{2} - x - \frac {e^{x}}{4} - \frac {3 \log {\relax (x )}^{2}}{4} + \log {\left (x + 2 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x-12)*ln(x)+(-x**2-2*x)*exp(x)+16*x**3+28*x**2-4*x)/(4*x**2+8*x),x)

[Out]

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

________________________________________________________________________________________