3.70.67 \(\int \frac {4+4 x-8 x^2+e^{2 x} (-x-2 x^2)}{4 x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 32, normalized size of antiderivative = 1.14, number of steps used = 7, number of rules used = 4, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 14, 2176, 2194} \begin {gather*} -x^2+x+\frac {e^{2 x}}{8}-\frac {1}{8} e^{2 x} (2 x+1)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 17, normalized size = 0.61




method result size



default \(-x^{2}+x +\ln \relax (x )-\frac {x \,{\mathrm e}^{2 x}}{4}\) \(17\)
norman \(-x^{2}+x +\ln \relax (x )-\frac {x \,{\mathrm e}^{2 x}}{4}\) \(17\)
risch \(-x^{2}+x +\ln \relax (x )-\frac {x \,{\mathrm e}^{2 x}}{4}\) \(17\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 16, normalized size = 0.57 \begin {gather*} x+\ln \relax (x)-\frac {x\,{\mathrm {e}}^{2\,x}}{4}-x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 15, normalized size = 0.54 \begin {gather*} - x^{2} - \frac {x e^{2 x}}{4} + x + \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________