\(\int \frac {-5+e^x (-5-2 x)+3 x-5 x^2-2 x^3+(-10 x-4 x^2) \log (e^x (5 x+2 x^2))}{5+2 x} \, dx\) [6903]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 56, antiderivative size = 31 \[ \int \frac {-5+e^x (-5-2 x)+3 x-5 x^2-2 x^3+\left (-10 x-4 x^2\right ) \log \left (e^x \left (5 x+2 x^2\right )\right )}{5+2 x} \, dx=-e^x-x+x^2 \left (1-\log \left (e^x (x+x (4+2 x))\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.19 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90, number of steps used = 10, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.089, Rules used = {6874, 2225, 1864, 2631, 785} \[ \int \frac {-5+e^x (-5-2 x)+3 x-5 x^2-2 x^3+\left (-10 x-4 x^2\right ) \log \left (e^x \left (5 x+2 x^2\right )\right )}{5+2 x} \, dx=x^2+x^2 \left (-\log \left (e^x x (2 x+5)\right )\right )-x-e^x \]

[In]

Int[(-5 + E^x*(-5 - 2*x) + 3*x - 5*x^2 - 2*x^3 + (-10*x - 4*x^2)*Log[E^x*(5*x + 2*x^2)])/(5 + 2*x),x]

[Out]

-E^x - x + x^2 - x^2*Log[E^x*x*(5 + 2*x)]

Rule 785

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

Rule 1864

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

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 2631

Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[(a + b*x)^(m + 1)*(Log[u]/(b*(m + 1))), x] - Dist[1/
(b*(m + 1)), Int[SimplifyIntegrand[(a + b*x)^(m + 1)*(D[u, x]/u), x], x], x] /; FreeQ[{a, b, m}, x] && Inverse
FunctionFreeQ[u, x] && NeQ[m, -1]

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \left (-e^x+\frac {-5+3 x-5 x^2-2 x^3-10 x \log \left (e^x x (5+2 x)\right )-4 x^2 \log \left (e^x x (5+2 x)\right )}{5+2 x}\right ) \, dx \\ & = -\int e^x \, dx+\int \frac {-5+3 x-5 x^2-2 x^3-10 x \log \left (e^x x (5+2 x)\right )-4 x^2 \log \left (e^x x (5+2 x)\right )}{5+2 x} \, dx \\ & = -e^x+\int \left (\frac {-5+3 x-5 x^2-2 x^3}{5+2 x}-2 x \log \left (e^x x (5+2 x)\right )\right ) \, dx \\ & = -e^x-2 \int x \log \left (e^x x (5+2 x)\right ) \, dx+\int \frac {-5+3 x-5 x^2-2 x^3}{5+2 x} \, dx \\ & = -e^x-x^2 \log \left (e^x x (5+2 x)\right )+\int \frac {x \left (5+9 x+2 x^2\right )}{5+2 x} \, dx+\int \left (\frac {3}{2}-x^2-\frac {25}{2 (5+2 x)}\right ) \, dx \\ & = -e^x+\frac {3 x}{2}-\frac {x^3}{3}-\frac {25}{4} \log (5+2 x)-x^2 \log \left (e^x x (5+2 x)\right )+\int \left (-\frac {5}{2}+2 x+x^2+\frac {25}{2 (5+2 x)}\right ) \, dx \\ & = -e^x-x+x^2-x^2 \log \left (e^x x (5+2 x)\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90 \[ \int \frac {-5+e^x (-5-2 x)+3 x-5 x^2-2 x^3+\left (-10 x-4 x^2\right ) \log \left (e^x \left (5 x+2 x^2\right )\right )}{5+2 x} \, dx=-e^x-x+x^2-x^2 \log \left (e^x x (5+2 x)\right ) \]

[In]

Integrate[(-5 + E^x*(-5 - 2*x) + 3*x - 5*x^2 - 2*x^3 + (-10*x - 4*x^2)*Log[E^x*(5*x + 2*x^2)])/(5 + 2*x),x]

[Out]

-E^x - x + x^2 - x^2*Log[E^x*x*(5 + 2*x)]

Maple [A] (verified)

Time = 0.69 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90

method result size
parallelrisch \(-\ln \left (x \left (5+2 x \right ) {\mathrm e}^{x}\right ) x^{2}-\frac {5}{4}+x^{2}-x -{\mathrm e}^{x}\) \(28\)
default \(-\ln \left (\left (2 x^{2}+5 x \right ) {\mathrm e}^{x}\right ) x^{2}-x +x^{2}-{\mathrm e}^{x}\) \(30\)
norman \(-\ln \left (\left (2 x^{2}+5 x \right ) {\mathrm e}^{x}\right ) x^{2}-x +x^{2}-{\mathrm e}^{x}\) \(30\)
parts \(-\ln \left (\left (2 x^{2}+5 x \right ) {\mathrm e}^{x}\right ) x^{2}-x +x^{2}-{\mathrm e}^{x}\) \(30\)
risch \(-x^{2} \ln \left ({\mathrm e}^{x}\right )-x^{2} \ln \left (\frac {5}{2}+x \right )-x^{2} \ln \left (x \right )+\frac {i \pi \,x^{2} \operatorname {csgn}\left (i x \left (\frac {5}{2}+x \right ) {\mathrm e}^{x}\right )^{3}}{2}+\frac {i \pi \,x^{2} \operatorname {csgn}\left (i \left (\frac {5}{2}+x \right )\right ) \operatorname {csgn}\left (i {\mathrm e}^{x} \left (\frac {5}{2}+x \right )\right ) \operatorname {csgn}\left (i {\mathrm e}^{x}\right )}{2}-\frac {i \pi \,x^{2} \operatorname {csgn}\left (i \left (\frac {5}{2}+x \right )\right ) \operatorname {csgn}\left (i {\mathrm e}^{x} \left (\frac {5}{2}+x \right )\right )^{2}}{2}+\frac {i \pi \,x^{2} \operatorname {csgn}\left (i {\mathrm e}^{x} \left (\frac {5}{2}+x \right )\right ) \operatorname {csgn}\left (i x \left (\frac {5}{2}+x \right ) {\mathrm e}^{x}\right ) \operatorname {csgn}\left (i x \right )}{2}-\frac {i \pi \,x^{2} \operatorname {csgn}\left (i x \left (\frac {5}{2}+x \right ) {\mathrm e}^{x}\right )^{2} \operatorname {csgn}\left (i x \right )}{2}-\frac {i \pi \,x^{2} \operatorname {csgn}\left (i {\mathrm e}^{x} \left (\frac {5}{2}+x \right )\right ) \operatorname {csgn}\left (i x \left (\frac {5}{2}+x \right ) {\mathrm e}^{x}\right )^{2}}{2}-\frac {i \pi \,x^{2} \operatorname {csgn}\left (i {\mathrm e}^{x} \left (\frac {5}{2}+x \right )\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{x}\right )}{2}+\frac {i \pi \,x^{2} \operatorname {csgn}\left (i {\mathrm e}^{x} \left (\frac {5}{2}+x \right )\right )^{3}}{2}-x^{2} \ln \left (2\right )+x^{2}-x -{\mathrm e}^{x}\) \(241\)

[In]

int(((-4*x^2-10*x)*ln((2*x^2+5*x)*exp(x))+(-2*x-5)*exp(x)-2*x^3-5*x^2+3*x-5)/(5+2*x),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.94 \[ \int \frac {-5+e^x (-5-2 x)+3 x-5 x^2-2 x^3+\left (-10 x-4 x^2\right ) \log \left (e^x \left (5 x+2 x^2\right )\right )}{5+2 x} \, dx=-x^{2} \log \left ({\left (2 \, x^{2} + 5 \, x\right )} e^{x}\right ) + x^{2} - x - e^{x} \]

[In]

integrate(((-4*x^2-10*x)*log((2*x^2+5*x)*exp(x))+(-2*x-5)*exp(x)-2*x^3-5*x^2+3*x-5)/(5+2*x),x, algorithm="fric
as")

[Out]

-x^2*log((2*x^2 + 5*x)*e^x) + x^2 - x - e^x

Sympy [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.42 \[ \int \frac {-5+e^x (-5-2 x)+3 x-5 x^2-2 x^3+\left (-10 x-4 x^2\right ) \log \left (e^x \left (5 x+2 x^2\right )\right )}{5+2 x} \, dx=x^{2} - \frac {49 x}{24} + \left (\frac {25}{24} - x^{2}\right ) \log {\left (\left (2 x^{2} + 5 x\right ) e^{x} \right )} - e^{x} - \frac {25 \log {\left (2 x^{2} + 5 x \right )}}{24} \]

[In]

integrate(((-4*x**2-10*x)*ln((2*x**2+5*x)*exp(x))+(-2*x-5)*exp(x)-2*x**3-5*x**2+3*x-5)/(5+2*x),x)

[Out]

x**2 - 49*x/24 + (25/24 - x**2)*log((2*x**2 + 5*x)*exp(x)) - exp(x) - 25*log(2*x**2 + 5*x)/24

Maxima [F]

\[ \int \frac {-5+e^x (-5-2 x)+3 x-5 x^2-2 x^3+\left (-10 x-4 x^2\right ) \log \left (e^x \left (5 x+2 x^2\right )\right )}{5+2 x} \, dx=\int { -\frac {2 \, x^{3} + 5 \, x^{2} + {\left (2 \, x + 5\right )} e^{x} + 2 \, {\left (2 \, x^{2} + 5 \, x\right )} \log \left ({\left (2 \, x^{2} + 5 \, x\right )} e^{x}\right ) - 3 \, x + 5}{2 \, x + 5} \,d x } \]

[In]

integrate(((-4*x^2-10*x)*log((2*x^2+5*x)*exp(x))+(-2*x-5)*exp(x)-2*x^3-5*x^2+3*x-5)/(5+2*x),x, algorithm="maxi
ma")

[Out]

-x^3 - x^2*log(x) + x^2 + 5/2*e^(-5/2)*exp_integral_e(1, -x - 5/2) - 1/4*(4*x^2 - 25)*log(2*x + 5) - x - 2*int
egrate(x*e^x/(2*x + 5), x) - 25/4*log(2*x + 5)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00 \[ \int \frac {-5+e^x (-5-2 x)+3 x-5 x^2-2 x^3+\left (-10 x-4 x^2\right ) \log \left (e^x \left (5 x+2 x^2\right )\right )}{5+2 x} \, dx=-x^{3} - x^{2} \log \left (2 \, x^{2} + 5 \, x\right ) + x^{2} - x - e^{x} \]

[In]

integrate(((-4*x^2-10*x)*log((2*x^2+5*x)*exp(x))+(-2*x-5)*exp(x)-2*x^3-5*x^2+3*x-5)/(5+2*x),x, algorithm="giac
")

[Out]

-x^3 - x^2*log(2*x^2 + 5*x) + x^2 - x - e^x

Mupad [B] (verification not implemented)

Time = 11.30 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.94 \[ \int \frac {-5+e^x (-5-2 x)+3 x-5 x^2-2 x^3+\left (-10 x-4 x^2\right ) \log \left (e^x \left (5 x+2 x^2\right )\right )}{5+2 x} \, dx=x^2-{\mathrm {e}}^x-x^2\,\ln \left ({\mathrm {e}}^x\,\left (2\,x^2+5\,x\right )\right )-x \]

[In]

int(-(exp(x)*(2*x + 5) - 3*x + 5*x^2 + 2*x^3 + log(exp(x)*(5*x + 2*x^2))*(10*x + 4*x^2) + 5)/(2*x + 5),x)

[Out]

x^2 - exp(x) - x^2*log(exp(x)*(5*x + 2*x^2)) - x