3.14.35 \(\int \frac {2 x^2-4 x^3+e (-8-2 x^2)+e^x (e (-4-x)+x^2-2 x^3)+(2 e+e^{1+x}) \log (2+e^x)}{2 x^2+e^x x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [F]  time = 0.56, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {2 x^2-4 x^3+e \left (-8-2 x^2\right )+e^x \left (e (-4-x)+x^2-2 x^3\right )+\left (2 e+e^{1+x}\right ) \log \left (2+e^x\right )}{2 x^2+e^x x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.24, size = 31, normalized size = 1.29 \begin {gather*} \frac {4 e}{x}+x-e x-x^2+\frac {e (-1+x) \log \left (2+e^x\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.46, size = 42, normalized size = 1.75 \begin {gather*} -\frac {x^{3} + x^{2} e - x e \log \left (e^{x} + 2\right ) - x^{2} + e \log \left (e^{x} + 2\right ) - 4 \, e}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 43, normalized size = 1.79




method result size



norman \(\frac {\left (1-{\mathrm e}\right ) x^{2}+{\mathrm e} x \ln \left ({\mathrm e}^{x}+2\right )-x^{3}-{\mathrm e} \ln \left ({\mathrm e}^{x}+2\right )+4 \,{\mathrm e}}{x}\) \(43\)
risch \(-\frac {{\mathrm e} \ln \left ({\mathrm e}^{x}+2\right )}{x}+\frac {{\mathrm e} x \ln \left ({\mathrm e}^{x}+2\right )-x^{2} {\mathrm e}-x^{3}+x^{2}+4 \,{\mathrm e}}{x}\) \(47\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((exp(1)*exp(x)+2*exp(1))*ln(exp(x)+2)+((-x-4)*exp(1)-2*x^3+x^2)*exp(x)+(-2*x^2-8)*exp(1)-4*x^3+2*x^2)/(ex
p(x)*x^2+2*x^2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.58, size = 37, normalized size = 1.54 \begin {gather*} -\frac {x^{3} + x^{2} {\left (e - 1\right )} - {\left (x e - e\right )} \log \left (e^{x} + 2\right ) - 4 \, e}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.12, size = 160, normalized size = 6.67 \begin {gather*} -\frac {4\,x^3\,{\mathrm {e}}^x-16\,\mathrm {e}-4\,{\mathrm {e}}^{2\,x+1}-16\,{\mathrm {e}}^{x+1}+4\,{\mathrm {e}}^{x+1}\,\ln \left ({\mathrm {e}}^x+2\right )+x^2\,\left (4\,\mathrm {e}-4\right )+4\,\mathrm {e}\,\ln \left ({\mathrm {e}}^x+2\right )+x^3\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{2\,x+1}\,\ln \left ({\mathrm {e}}^x+2\right )+4\,x^3-x\,{\mathrm {e}}^{2\,x+1}\,\ln \left ({\mathrm {e}}^x+2\right )+x^2\,{\mathrm {e}}^{2\,x}\,\left (\mathrm {e}-1\right )+x^2\,{\mathrm {e}}^x\,\left (4\,\mathrm {e}-4\right )-4\,x\,{\mathrm {e}}^{x+1}\,\ln \left ({\mathrm {e}}^x+2\right )-4\,x\,\mathrm {e}\,\ln \left ({\mathrm {e}}^x+2\right )}{4\,x+x\,{\mathrm {e}}^{2\,x}+4\,x\,{\mathrm {e}}^x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(4*x^3*exp(x) - 16*exp(1) - 4*exp(2*x + 1) - 16*exp(x + 1) + 4*exp(x + 1)*log(exp(x) + 2) + x^2*(4*exp(1) - 4
) + 4*exp(1)*log(exp(x) + 2) + x^3*exp(2*x) + exp(2*x + 1)*log(exp(x) + 2) + 4*x^3 - x*exp(2*x + 1)*log(exp(x)
 + 2) + x^2*exp(2*x)*(exp(1) - 1) + x^2*exp(x)*(4*exp(1) - 4) - 4*x*exp(x + 1)*log(exp(x) + 2) - 4*x*exp(1)*lo
g(exp(x) + 2))/(4*x + x*exp(2*x) + 4*x*exp(x))

________________________________________________________________________________________

sympy [A]  time = 0.26, size = 37, normalized size = 1.54 \begin {gather*} - x^{2} - x \left (-1 + e\right ) + e \log {\left (e^{x} + 2 \right )} - \frac {e \log {\left (e^{x} + 2 \right )}}{x} + \frac {4 e}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x**2 - x*(-1 + E) + E*log(exp(x) + 2) - E*log(exp(x) + 2)/x + 4*E/x

________________________________________________________________________________________