3.38.4 \(\int \frac {-1+2 x+e^{-5+e^{-5+3 x}+3 x} (-3 x+3 x^2)}{-x+x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.44, antiderivative size = 18, normalized size of antiderivative = 0.95, number of steps used = 7, number of rules used = 5, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {1593, 6742, 2282, 2194, 72} \begin {gather*} e^{e^{3 x-5}}+\log (1-x)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^E^(-5 + 3*x) + Log[1 - x] + Log[x]

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[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 \frac {-1+2 x+e^{-5+e^{-5+3 x}+3 x} \left (-3 x+3 x^2\right )}{(-1+x) x} \, dx\\ &=\int \left (3 e^{-5+e^{-5+3 x}+3 x}+\frac {-1+2 x}{(-1+x) x}\right ) \, dx\\ &=3 \int e^{-5+e^{-5+3 x}+3 x} \, dx+\int \frac {-1+2 x}{(-1+x) x} \, dx\\ &=\int \left (\frac {1}{-1+x}+\frac {1}{x}\right ) \, dx+\operatorname {Subst}\left (\int e^{-5+\frac {x}{e^5}} \, dx,x,e^{3 x}\right )\\ &=e^{e^{-5+3 x}}+\log (1-x)+\log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.16, size = 18, normalized size = 0.95 \begin {gather*} e^{e^{-5+3 x}}+\log (1-x)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^E^(-5 + 3*x) + Log[1 - x] + Log[x]

________________________________________________________________________________________

fricas [B]  time = 0.62, size = 35, normalized size = 1.84 \begin {gather*} {\left (e^{\left (3 \, x - 5\right )} \log \left (x^{2} - x\right ) + e^{\left (3 \, x + e^{\left (3 \, x - 5\right )} - 5\right )}\right )} e^{\left (-3 \, x + 5\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.19, size = 33, normalized size = 1.74 \begin {gather*} {\left (e^{\left (3 \, x\right )} \log \left (x - 1\right ) + e^{\left (3 \, x\right )} \log \relax (x) + e^{\left (3 \, x + e^{\left (3 \, x - 5\right )}\right )}\right )} e^{\left (-3 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(e^(3*x)*log(x - 1) + e^(3*x)*log(x) + e^(3*x + e^(3*x - 5)))*e^(-3*x)

________________________________________________________________________________________

maple [A]  time = 0.13, size = 15, normalized size = 0.79




method result size



norman \({\mathrm e}^{{\mathrm e}^{3 x -5}}+\ln \left (x -1\right )+\ln \relax (x )\) \(15\)
risch \(\ln \left (x^{2}-x \right )+{\mathrm e}^{{\mathrm e}^{3 x -5}}\) \(17\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(exp(3*x-5))+ln(x-1)+ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 14, normalized size = 0.74 \begin {gather*} e^{\left (e^{\left (3 \, x - 5\right )}\right )} + \log \left (x - 1\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

e^(e^(3*x - 5)) + log(x - 1) + log(x)

________________________________________________________________________________________

mupad [B]  time = 2.21, size = 15, normalized size = 0.79 \begin {gather*} \ln \left (x\,\left (x-1\right )\right )+{\mathrm {e}}^{{\mathrm {e}}^{3\,x}\,{\mathrm {e}}^{-5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x*(x - 1)) + exp(exp(3*x)*exp(-5))

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 14, normalized size = 0.74 \begin {gather*} e^{e^{3 x - 5}} + \log {\left (x^{2} - x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x**2-3*x)*exp(3*x-5)*exp(exp(3*x-5))+2*x-1)/(x**2-x),x)

[Out]

exp(exp(3*x - 5)) + log(x**2 - x)

________________________________________________________________________________________