\(\int \frac {-24+16 x-56 x^2+12 x^3+e^x (-3-13 x+3 x^2)+(e^x+4 x) \log (e^x+4 x)}{e^x+4 x} \, dx\) [7546]

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

Optimal result

Integrand size = 55, antiderivative size = 26 \[ \int \frac {-24+16 x-56 x^2+12 x^3+e^x \left (-3-13 x+3 x^2\right )+\left (e^x+4 x\right ) \log \left (e^x+4 x\right )}{e^x+4 x} \, dx=x \left (-3+(-6+x) \left (x+\frac {-x+\log \left (e^x+4 x\right )}{x}\right )\right ) \]

[Out]

x*((-6+x)*((ln(4*x+exp(x))-x)/x+x)-3)

Rubi [F]

\[ \int \frac {-24+16 x-56 x^2+12 x^3+e^x \left (-3-13 x+3 x^2\right )+\left (e^x+4 x\right ) \log \left (e^x+4 x\right )}{e^x+4 x} \, dx=\int \frac {-24+16 x-56 x^2+12 x^3+e^x \left (-3-13 x+3 x^2\right )+\left (e^x+4 x\right ) \log \left (e^x+4 x\right )}{e^x+4 x} \, dx \]

[In]

Int[(-24 + 16*x - 56*x^2 + 12*x^3 + E^x*(-3 - 13*x + 3*x^2) + (E^x + 4*x)*Log[E^x + 4*x])/(E^x + 4*x),x]

[Out]

-3*x - 7*x^2 + x^3 + x*Log[E^x + 4*x] - 24*Defer[Int][(E^x + 4*x)^(-1), x] + 24*Defer[Int][x/(E^x + 4*x), x]

Rubi steps \begin{align*} \text {integral}& = \int \left (-3-13 x+3 x^2-\frac {4 \left (6-7 x+x^2\right )}{e^x+4 x}+\log \left (e^x+4 x\right )\right ) \, dx \\ & = -3 x-\frac {13 x^2}{2}+x^3-4 \int \frac {6-7 x+x^2}{e^x+4 x} \, dx+\int \log \left (e^x+4 x\right ) \, dx \\ & = -3 x-\frac {13 x^2}{2}+x^3+x \log \left (e^x+4 x\right )-4 \int \left (\frac {6}{e^x+4 x}-\frac {7 x}{e^x+4 x}+\frac {x^2}{e^x+4 x}\right ) \, dx-\int \frac {\left (4+e^x\right ) x}{e^x+4 x} \, dx \\ & = -3 x-\frac {13 x^2}{2}+x^3+x \log \left (e^x+4 x\right )-4 \int \frac {x^2}{e^x+4 x} \, dx-24 \int \frac {1}{e^x+4 x} \, dx+28 \int \frac {x}{e^x+4 x} \, dx-\int \left (x-\frac {4 (-1+x) x}{e^x+4 x}\right ) \, dx \\ & = -3 x-7 x^2+x^3+x \log \left (e^x+4 x\right )+4 \int \frac {(-1+x) x}{e^x+4 x} \, dx-4 \int \frac {x^2}{e^x+4 x} \, dx-24 \int \frac {1}{e^x+4 x} \, dx+28 \int \frac {x}{e^x+4 x} \, dx \\ & = -3 x-7 x^2+x^3+x \log \left (e^x+4 x\right )-4 \int \frac {x^2}{e^x+4 x} \, dx+4 \int \left (-\frac {x}{e^x+4 x}+\frac {x^2}{e^x+4 x}\right ) \, dx-24 \int \frac {1}{e^x+4 x} \, dx+28 \int \frac {x}{e^x+4 x} \, dx \\ & = -3 x-7 x^2+x^3+x \log \left (e^x+4 x\right )-4 \int \frac {x}{e^x+4 x} \, dx-24 \int \frac {1}{e^x+4 x} \, dx+28 \int \frac {x}{e^x+4 x} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.23 \[ \int \frac {-24+16 x-56 x^2+12 x^3+e^x \left (-3-13 x+3 x^2\right )+\left (e^x+4 x\right ) \log \left (e^x+4 x\right )}{e^x+4 x} \, dx=3 x-7 x^2+x^3-6 \log \left (e^x+4 x\right )+x \log \left (e^x+4 x\right ) \]

[In]

Integrate[(-24 + 16*x - 56*x^2 + 12*x^3 + E^x*(-3 - 13*x + 3*x^2) + (E^x + 4*x)*Log[E^x + 4*x])/(E^x + 4*x),x]

[Out]

3*x - 7*x^2 + x^3 - 6*Log[E^x + 4*x] + x*Log[E^x + 4*x]

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.19

method result size
norman \(x^{3}-6 \ln \left (4 x +{\mathrm e}^{x}\right )+\ln \left (4 x +{\mathrm e}^{x}\right ) x +3 x -7 x^{2}\) \(31\)
risch \(x^{3}-6 \ln \left (4 x +{\mathrm e}^{x}\right )+\ln \left (4 x +{\mathrm e}^{x}\right ) x +3 x -7 x^{2}\) \(31\)
parallelrisch \(x^{3}-6 \ln \left (4 x +{\mathrm e}^{x}\right )+\ln \left (4 x +{\mathrm e}^{x}\right ) x +3 x -7 x^{2}\) \(31\)

[In]

int(((4*x+exp(x))*ln(4*x+exp(x))+(3*x^2-13*x-3)*exp(x)+12*x^3-56*x^2+16*x-24)/(4*x+exp(x)),x,method=_RETURNVER
BOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88 \[ \int \frac {-24+16 x-56 x^2+12 x^3+e^x \left (-3-13 x+3 x^2\right )+\left (e^x+4 x\right ) \log \left (e^x+4 x\right )}{e^x+4 x} \, dx=x^{3} - 7 \, x^{2} + {\left (x - 6\right )} \log \left (4 \, x + e^{x}\right ) + 3 \, x \]

[In]

integrate(((4*x+exp(x))*log(4*x+exp(x))+(3*x^2-13*x-3)*exp(x)+12*x^3-56*x^2+16*x-24)/(4*x+exp(x)),x, algorithm
="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.19 \[ \int \frac {-24+16 x-56 x^2+12 x^3+e^x \left (-3-13 x+3 x^2\right )+\left (e^x+4 x\right ) \log \left (e^x+4 x\right )}{e^x+4 x} \, dx=x^{3} - 7 x^{2} + x \log {\left (4 x + e^{x} \right )} + 3 x - 6 \log {\left (4 x + e^{x} \right )} \]

[In]

integrate(((4*x+exp(x))*ln(4*x+exp(x))+(3*x**2-13*x-3)*exp(x)+12*x**3-56*x**2+16*x-24)/(4*x+exp(x)),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88 \[ \int \frac {-24+16 x-56 x^2+12 x^3+e^x \left (-3-13 x+3 x^2\right )+\left (e^x+4 x\right ) \log \left (e^x+4 x\right )}{e^x+4 x} \, dx=x^{3} - 7 \, x^{2} + {\left (x - 6\right )} \log \left (4 \, x + e^{x}\right ) + 3 \, x \]

[In]

integrate(((4*x+exp(x))*log(4*x+exp(x))+(3*x^2-13*x-3)*exp(x)+12*x^3-56*x^2+16*x-24)/(4*x+exp(x)),x, algorithm
="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.23 \[ \int \frac {-24+16 x-56 x^2+12 x^3+e^x \left (-3-13 x+3 x^2\right )+\left (e^x+4 x\right ) \log \left (e^x+4 x\right )}{e^x+4 x} \, dx=x^{3} - 7 \, x^{2} + x \log \left (4 \, x + e^{x}\right ) + 3 \, x - 6 \, \log \left (-4 \, x - e^{x}\right ) \]

[In]

integrate(((4*x+exp(x))*log(4*x+exp(x))+(3*x^2-13*x-3)*exp(x)+12*x^3-56*x^2+16*x-24)/(4*x+exp(x)),x, algorithm
="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.50 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.15 \[ \int \frac {-24+16 x-56 x^2+12 x^3+e^x \left (-3-13 x+3 x^2\right )+\left (e^x+4 x\right ) \log \left (e^x+4 x\right )}{e^x+4 x} \, dx=3\,x-6\,\ln \left (4\,x+{\mathrm {e}}^x\right )+x\,\ln \left (4\,x+{\mathrm {e}}^x\right )-7\,x^2+x^3 \]

[In]

int((16*x - exp(x)*(13*x - 3*x^2 + 3) - 56*x^2 + 12*x^3 + log(4*x + exp(x))*(4*x + exp(x)) - 24)/(4*x + exp(x)
),x)

[Out]

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