3.72.66 \(\int \frac {3 x-4 x^2+2 x^3+e^{x/2} (6 x-8 x^2)+e^x (-x+2 x^2)+(-2-8 e^{x/2}+2 e^x+2 x) \log (x)}{-x-4 e^{x/2} x+e^x x+x^2} \, dx\)

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

________________________________________________________________________________________

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

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 24, normalized size = 0.73




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.47, size = 23, normalized size = 0.70 \begin {gather*} \ln \left (x+{\mathrm {e}}^x-4\,\sqrt {{\mathrm {e}}^x}-1\right )-2\,x+{\ln \relax (x)}^2+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________