3.44.16 \(\int \frac {-24 x+4 e^{2 x} x+12 x^2+e^x (-12-8 x+8 x^2)}{3 x^2+e^{2 x} (1+x)+e^x (3+3 x+x^2)} \, dx\)

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

________________________________________________________________________________________

Rubi [F]  time = 0.92, 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 {-24 x+4 e^{2 x} x+12 x^2+e^x \left (-12-8 x+8 x^2\right )}{3 x^2+e^{2 x} (1+x)+e^x \left (3+3 x+x^2\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 25, normalized size = 0.86 \begin {gather*} 4 \left (x+\log \left (3+e^x\right )-\log \left (e^x+e^x x+x^2\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x*exp(x)^2+(8*x^2-8*x-12)*exp(x)+12*x^2-24*x)/((x+1)*exp(x)^2+(x^2+3*x+3)*exp(x)+3*x^2),x, algori
thm="fricas")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x*exp(x)^2+(8*x^2-8*x-12)*exp(x)+12*x^2-24*x)/((x+1)*exp(x)^2+(x^2+3*x+3)*exp(x)+3*x^2),x, algori
thm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 25, normalized size = 0.86




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((4*x*exp(x)^2+(8*x^2-8*x-12)*exp(x)+12*x^2-24*x)/((x+1)*exp(x)^2+(x^2+3*x+3)*exp(x)+3*x^2),x,method=_RETUR
NVERBOSE)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((4*x*exp(x)^2+(8*x^2-8*x-12)*exp(x)+12*x^2-24*x)/((x+1)*exp(x)^2+(x^2+3*x+3)*exp(x)+3*x^2),x, algori
thm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.13, size = 24, normalized size = 0.83 \begin {gather*} 4\,x-4\,\ln \left ({\mathrm {e}}^x+x\,{\mathrm {e}}^x+x^2\right )+4\,\ln \left ({\mathrm {e}}^x+3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: PolynomialError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: PolynomialError

________________________________________________________________________________________