3.40.68 \(\int \frac {-29+290 x-290 x^2+58 x^3+e^x (1-9 x+9 x^2-2 x^3)}{29 x-29 x^2+e^x (-x+x^2)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.66, antiderivative size = 31, normalized size of antiderivative = 1.19, number of steps used = 9, number of rules used = 7, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.123, Rules used = {6741, 6742, 2282, 36, 31, 29, 1620} \begin {gather*} -x^2+8 x-\log \left (29-e^x\right )-\log (1-x)-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-29 + 290*x - 290*x^2 + 58*x^3 + E^x*(1 - 9*x + 9*x^2 - 2*x^3))/(29*x - 29*x^2 + E^x*(-x + x^2)),x]

[Out]

8*x - x^2 - Log[29 - E^x] - Log[1 - x] - Log[x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

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 6741

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

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 {-29+290 x-290 x^2+58 x^3+e^x \left (1-9 x+9 x^2-2 x^3\right )}{\left (29-e^x\right ) (1-x) x} \, dx\\ &=\int \left (-\frac {29}{-29+e^x}+\frac {1-9 x+9 x^2-2 x^3}{(-1+x) x}\right ) \, dx\\ &=-\left (29 \int \frac {1}{-29+e^x} \, dx\right )+\int \frac {1-9 x+9 x^2-2 x^3}{(-1+x) x} \, dx\\ &=-\left (29 \operatorname {Subst}\left (\int \frac {1}{(-29+x) x} \, dx,x,e^x\right )\right )+\int \left (7+\frac {1}{1-x}-\frac {1}{x}-2 x\right ) \, dx\\ &=7 x-x^2-\log (1-x)-\log (x)-\operatorname {Subst}\left (\int \frac {1}{-29+x} \, dx,x,e^x\right )+\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )\\ &=8 x-x^2-\log \left (29-e^x\right )-\log (1-x)-\log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 31, normalized size = 1.19 \begin {gather*} 8 x-x^2-\log \left (29-e^x\right )-\log (1-x)-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-29 + 290*x - 290*x^2 + 58*x^3 + E^x*(1 - 9*x + 9*x^2 - 2*x^3))/(29*x - 29*x^2 + E^x*(-x + x^2)),x]

[Out]

8*x - x^2 - Log[29 - E^x] - Log[1 - x] - Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 26, normalized size = 1.00 \begin {gather*} -x^{2} + 8 \, x - \log \left (x^{2} - x\right ) - \log \left (e^{x} - 29\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+9*x^2-9*x+1)*exp(x)+58*x^3-290*x^2+290*x-29)/((x^2-x)*exp(x)-29*x^2+29*x),x, algorithm="fri
cas")

[Out]

-x^2 + 8*x - log(x^2 - x) - log(e^x - 29)

________________________________________________________________________________________

giac [A]  time = 0.16, size = 26, normalized size = 1.00 \begin {gather*} -x^{2} + 8 \, x - \log \left (x - 1\right ) - \log \relax (x) - \log \left (e^{x} - 29\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+9*x^2-9*x+1)*exp(x)+58*x^3-290*x^2+290*x-29)/((x^2-x)*exp(x)-29*x^2+29*x),x, algorithm="gia
c")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 27, normalized size = 1.04




method result size



norman \(-x^{2}+8 x -\ln \relax (x )-\ln \left (x -1\right )-\ln \left ({\mathrm e}^{x}-29\right )\) \(27\)
risch \(-x^{2}+8 x -\ln \left (x^{2}-x \right )-\ln \left ({\mathrm e}^{x}-29\right )\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*x^3+9*x^2-9*x+1)*exp(x)+58*x^3-290*x^2+290*x-29)/((x^2-x)*exp(x)-29*x^2+29*x),x,method=_RETURNVERBOSE
)

[Out]

-x^2+8*x-ln(x)-ln(x-1)-ln(exp(x)-29)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+9*x^2-9*x+1)*exp(x)+58*x^3-290*x^2+290*x-29)/((x^2-x)*exp(x)-29*x^2+29*x),x, algorithm="max
ima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 26, normalized size = 1.00 \begin {gather*} 8\,x-\ln \left (x-1\right )-\ln \left ({\mathrm {e}}^x-29\right )-\ln \relax (x)-x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((290*x^2 - 290*x - 58*x^3 + exp(x)*(9*x - 9*x^2 + 2*x^3 - 1) + 29)/(exp(x)*(x - x^2) - 29*x + 29*x^2),x)

[Out]

8*x - log(x - 1) - log(exp(x) - 29) - log(x) - x^2

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 19, normalized size = 0.73 \begin {gather*} - x^{2} + 8 x - \log {\left (x^{2} - x \right )} - \log {\left (e^{x} - 29 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x**3+9*x**2-9*x+1)*exp(x)+58*x**3-290*x**2+290*x-29)/((x**2-x)*exp(x)-29*x**2+29*x),x)

[Out]

-x**2 + 8*x - log(x**2 - x) - log(exp(x) - 29)

________________________________________________________________________________________