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

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

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 21, normalized size of antiderivative = 0.95, number of steps used = 5, number of rules used = 3, integrand size = 51, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {6, 1593, 1820} \begin {gather*} -x+\log (x)+\log \left (\left (1-e^5\right ) x+3 e+4\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

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 1820

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a +
 b*x^n)^p, x], x] /; FreeQ[{a, b, c, m, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 19, normalized size = 0.86 \begin {gather*} -x+\log (x)+\log \left (4+3 e+x-e^5 x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + Log[x] + Log[4 + 3*E + x - E^5*x]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 35, normalized size = 1.59 \begin {gather*} -\frac {x e^{5} - x}{e^{5} - 1} + \log \left ({\left | x e^{5} - x - 3 \, e - 4 \right |}\right ) + \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.45, size = 21, normalized size = 0.95




method result size



default \(-x +\ln \left (x \,{\mathrm e}^{5}-3 \,{\mathrm e}-x -4\right )+\ln \relax (x )\) \(21\)
norman \(-x +\ln \left (x \,{\mathrm e}^{5}-3 \,{\mathrm e}-x -4\right )+\ln \relax (x )\) \(21\)
risch \(-x +\ln \left (\left ({\mathrm e}^{5}-1\right ) x^{2}+\left (-3 \,{\mathrm e}-4\right ) x \right )\) \(23\)
meijerg \(\frac {\left (3 \,{\mathrm e}+4\right )^{2} \left (1-{\mathrm e}^{5}\right ) \left (\frac {x \left ({\mathrm e}^{5}-1\right )}{-3 \,{\mathrm e}-4}-\ln \left (1+\frac {x \left ({\mathrm e}^{5}-1\right )}{-3 \,{\mathrm e}-4}\right )\right )}{\left ({\mathrm e}^{5}-1\right )^{2} \left (-3 \,{\mathrm e}-4\right )}-\frac {\left (2 \,{\mathrm e}^{5}+3 \,{\mathrm e}+2\right ) \left (3 \,{\mathrm e}+4\right ) \ln \left (1+\frac {x \left ({\mathrm e}^{5}-1\right )}{-3 \,{\mathrm e}-4}\right )}{\left (-3 \,{\mathrm e}-4\right ) \left ({\mathrm e}^{5}-1\right )}+\frac {3 \,{\mathrm e} \left (3 \,{\mathrm e}+4\right ) \left (-\ln \left (1+\frac {x \left ({\mathrm e}^{5}-1\right )}{-3 \,{\mathrm e}-4}\right )+\ln \relax (x )+\ln \left ({\mathrm e}^{5}-1\right )+\ln \left (-\frac {1}{-3 \,{\mathrm e}-4}\right )+i \pi \right )}{\left (-3 \,{\mathrm e}-4\right )^{2}}+\frac {4 \left (3 \,{\mathrm e}+4\right ) \left (-\ln \left (1+\frac {x \left ({\mathrm e}^{5}-1\right )}{-3 \,{\mathrm e}-4}\right )+\ln \relax (x )+\ln \left ({\mathrm e}^{5}-1\right )+\ln \left (-\frac {1}{-3 \,{\mathrm e}-4}\right )+i \pi \right )}{\left (-3 \,{\mathrm e}-4\right )^{2}}\) \(232\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 23, normalized size = 1.05 \begin {gather*} \ln \left (x^2\,\left ({\mathrm {e}}^5-1\right )-x\,\left (3\,\mathrm {e}+4\right )\right )-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x + log(x**2*(-1 + exp(5)) + x*(-3*E - 4))

________________________________________________________________________________________