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

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

________________________________________________________________________________________

Rubi [A]  time = 1.15, antiderivative size = 37, normalized size of antiderivative = 1.28, number of steps used = 9, number of rules used = 2, integrand size = 79, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.025, Rules used = {6742, 2548} \begin {gather*} 2 x^2+x \log \left (\frac {e^{4 x}}{x^2}-x+2\right )-\frac {1}{2} (1-2 x)^2-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2548

Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[(x*D[u, x])/u, x], x] /; InverseFunctionFr
eeQ[u, x]

Rule 6742

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.13, size = 278, normalized size = 9.59




method result size



risch \(x \ln \left (-{\mathrm e}^{4 x}+x^{3}-2 x^{2}\right )-2 x \ln \relax (x )+\frac {i \pi x \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )}{2}-i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (i \left (-{\mathrm e}^{4 x}+x^{3}-2 x^{2}\right )\right ) \mathrm {csgn}\left (\frac {i \left (-{\mathrm e}^{4 x}+x^{3}-2 x^{2}\right )}{x^{2}}\right )}{2}+\frac {i \pi x \,\mathrm {csgn}\left (\frac {i}{x^{2}}\right ) \mathrm {csgn}\left (\frac {i \left (-{\mathrm e}^{4 x}+x^{3}-2 x^{2}\right )}{x^{2}}\right )^{2}}{2}+\frac {i \pi x \mathrm {csgn}\left (i x^{2}\right )^{3}}{2}-i \pi x \mathrm {csgn}\left (\frac {i \left (-{\mathrm e}^{4 x}+x^{3}-2 x^{2}\right )}{x^{2}}\right )^{2}+\frac {i \pi x \,\mathrm {csgn}\left (i \left (-{\mathrm e}^{4 x}+x^{3}-2 x^{2}\right )\right ) \mathrm {csgn}\left (\frac {i \left (-{\mathrm e}^{4 x}+x^{3}-2 x^{2}\right )}{x^{2}}\right )^{2}}{2}+\frac {i \pi x \mathrm {csgn}\left (\frac {i \left (-{\mathrm e}^{4 x}+x^{3}-2 x^{2}\right )}{x^{2}}\right )^{3}}{2}+i x \pi +x\) \(278\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*ln(-exp(4*x)+x^3-2*x^2)-2*x*ln(x)+1/2*I*Pi*x*csgn(I*x)^2*csgn(I*x^2)-I*Pi*x*csgn(I*x)*csgn(I*x^2)^2-1/2*I*Pi
*x*csgn(I/x^2)*csgn(I*(-exp(4*x)+x^3-2*x^2))*csgn(I/x^2*(-exp(4*x)+x^3-2*x^2))+1/2*I*Pi*x*csgn(I/x^2)*csgn(I/x
^2*(-exp(4*x)+x^3-2*x^2))^2+1/2*I*Pi*x*csgn(I*x^2)^3-I*Pi*x*csgn(I/x^2*(-exp(4*x)+x^3-2*x^2))^2+1/2*I*Pi*x*csg
n(I*(-exp(4*x)+x^3-2*x^2))*csgn(I/x^2*(-exp(4*x)+x^3-2*x^2))^2+1/2*I*Pi*x*csgn(I/x^2*(-exp(4*x)+x^3-2*x^2))^3+
I*x*Pi+x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________