3.88.49 \(\int \frac {3+2 x+3 x^2+e (-6+2 x-32 x^2+6 x^3)+e^2 (3-4 x+32 x^2-24 x^3+3 x^4)}{1+e (-2+2 x)+e^2 (1-2 x+x^2)} \, dx\)

Optimal. Leaf size=29 \[ x \left (3+x+x^2 \left (1+\frac {10 x}{x-\frac {x}{e}-x^2}\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 41, normalized size of antiderivative = 1.41, number of steps used = 4, number of rules used = 3, integrand size = 75, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.040, Rules used = {1986, 27, 1850} \begin {gather*} x^3-9 x^2+\frac {(10-7 e) x}{e}+\frac {10 (1-e)^3}{e^2 (e x-e+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

((10 - 7*E)*x)/E - 9*x^2 + x^3 + (10*(1 - E)^3)/(E^2*(1 - E + E*x))

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1850

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

Rule 1986

Int[(Pq_)*(u_)^(p_.), x_Symbol] :> Int[Pq*ExpandToSum[u, x]^p, x] /; FreeQ[p, x] && PolyQ[Pq, x] && QuadraticQ
[u, x] &&  !QuadraticMatchQ[u, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {3+2 x+3 x^2+e \left (-6+2 x-32 x^2+6 x^3\right )+e^2 \left (3-4 x+32 x^2-24 x^3+3 x^4\right )}{(-1+e)^2+2 (1-e) e x+e^2 x^2} \, dx\\ &=\int \frac {3+2 x+3 x^2+e \left (-6+2 x-32 x^2+6 x^3\right )+e^2 \left (3-4 x+32 x^2-24 x^3+3 x^4\right )}{(1-e+e x)^2} \, dx\\ &=\int \left (\frac {10-7 e}{e}-18 x+3 x^2+\frac {10 (-1+e)^3}{e (1-e+e x)^2}\right ) \, dx\\ &=\frac {(10-7 e) x}{e}-9 x^2+x^3+\frac {10 (1-e)^3}{e^2 (1-e+e x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 38, normalized size = 1.31 \begin {gather*} -\frac {10 (-1+e)^3}{e^2 (1+e (-1+x))}+\frac {(10-7 e) x}{e}-9 x^2+x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-10*(-1 + E)^3)/(E^2*(1 + E*(-1 + x))) + ((10 - 7*E)*x)/E - 9*x^2 + x^3

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 56, normalized size = 1.93 \begin {gather*} \frac {{\left (x^{4} - 10 \, x^{3} + 2 \, x^{2} + 7 \, x - 10\right )} e^{3} + {\left (x^{3} + x^{2} - 17 \, x + 30\right )} e^{2} + 10 \, {\left (x - 3\right )} e + 10}{{\left (x - 1\right )} e^{3} + e^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((x^4 - 10*x^3 + 2*x^2 + 7*x - 10)*e^3 + (x^3 + x^2 - 17*x + 30)*e^2 + 10*(x - 3)*e + 10)/((x - 1)*e^3 + e^2)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: (10*exp(2)-10*exp(1)^2)/exp(2)^2*ln(sage
VARx^2*exp(2)-2*sageVARx*exp(2)+2*sageVARx*exp(1)+exp(2)-2*exp(1)+1)+(20*exp(2)^3-60*exp(2)^2*exp(1)+60*exp(2)
^2-60*exp(2)*exp(1)+4

________________________________________________________________________________________

maple [A]  time = 0.53, size = 57, normalized size = 1.97




method result size



norman \(\frac {x^{4} {\mathrm e}+\left (-10 \,{\mathrm e}+1\right ) x^{3}+\left (2 \,{\mathrm e}+1\right ) x^{2}-3 \left ({\mathrm e}^{2}-2 \,{\mathrm e}+1\right ) {\mathrm e}^{-1}}{x \,{\mathrm e}-{\mathrm e}+1}\) \(57\)
gosper \(\frac {\left (x^{4} {\mathrm e}^{2}-10 x^{3} {\mathrm e}^{2}+2 x^{2} {\mathrm e}^{2}+x^{3} {\mathrm e}+x^{2} {\mathrm e}-3 \,{\mathrm e}^{2}+6 \,{\mathrm e}-3\right ) {\mathrm e}^{-1}}{x \,{\mathrm e}-{\mathrm e}+1}\) \(68\)
risch \({\mathrm e} \,{\mathrm e}^{-1} x^{3}-9 \,{\mathrm e} \,{\mathrm e}^{-1} x^{2}-7 \,{\mathrm e} \,{\mathrm e}^{-1} x +10 \,{\mathrm e}^{-1} x -\frac {10 \,{\mathrm e}^{-2} {\mathrm e}^{3}}{x \,{\mathrm e}-{\mathrm e}+1}+\frac {30 \,{\mathrm e}^{-2} {\mathrm e}^{2}}{x \,{\mathrm e}-{\mathrm e}+1}-\frac {30 \,{\mathrm e}^{-2} {\mathrm e}}{x \,{\mathrm e}-{\mathrm e}+1}+\frac {10 \,{\mathrm e}^{-2}}{x \,{\mathrm e}-{\mathrm e}+1}\) \(101\)
meijerg \(-3 \,{\mathrm e}^{-3} \left ({\mathrm e}-1\right )^{3} \left (-\frac {x \,{\mathrm e} \left (-\frac {5 x^{3} {\mathrm e}^{3}}{\left ({\mathrm e}-1\right )^{3}}-\frac {10 x^{2} {\mathrm e}^{2}}{\left ({\mathrm e}-1\right )^{2}}-\frac {30 x \,{\mathrm e}}{{\mathrm e}-1}+60\right )}{15 \left ({\mathrm e}-1\right ) \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )}-4 \ln \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )\right )+\left (-24 \,{\mathrm e}^{2}+6 \,{\mathrm e}\right ) \left ({\mathrm e}-1\right )^{2} {\mathrm e}^{-4} \left (\frac {x \,{\mathrm e} \left (-\frac {2 x^{2} {\mathrm e}^{2}}{\left ({\mathrm e}-1\right )^{2}}-\frac {6 x \,{\mathrm e}}{{\mathrm e}-1}+12\right )}{4 \left ({\mathrm e}-1\right ) \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )}+3 \ln \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )\right )-\left (32 \,{\mathrm e}^{2}-32 \,{\mathrm e}+3\right ) {\mathrm e}^{-3} \left ({\mathrm e}-1\right ) \left (-\frac {x \,{\mathrm e} \left (-\frac {3 x \,{\mathrm e}}{{\mathrm e}-1}+6\right )}{3 \left ({\mathrm e}-1\right ) \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )}-2 \ln \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )\right )+\left (-4 \,{\mathrm e}^{2}+2 \,{\mathrm e}+2\right ) {\mathrm e}^{-2} \left (\frac {x \,{\mathrm e}}{\left ({\mathrm e}-1\right ) \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )}+\ln \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )\right )+\frac {3 \,{\mathrm e}^{2} x}{\left ({\mathrm e}-1\right )^{2} \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )}-\frac {6 \,{\mathrm e} x}{\left ({\mathrm e}-1\right )^{2} \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )}+\frac {3 x}{\left ({\mathrm e}-1\right )^{2} \left (1-\frac {x \,{\mathrm e}}{{\mathrm e}-1}\right )}\) \(384\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 54, normalized size = 1.86 \begin {gather*} {\left (x^{3} e - 9 \, x^{2} e - x {\left (7 \, e - 10\right )}\right )} e^{\left (-1\right )} - \frac {10 \, {\left (e^{3} - 3 \, e^{2} + 3 \, e - 1\right )}}{x e^{3} - e^{3} + e^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^3*e - 9*x^2*e - x*(7*e - 10))*e^(-1) - 10*(e^3 - 3*e^2 + 3*e - 1)/(x*e^3 - e^3 + e^2)

________________________________________________________________________________________

mupad [B]  time = 5.62, size = 109, normalized size = 3.76 \begin {gather*} x^2\,\left (3\,{\mathrm {e}}^{-1}\,\left (\mathrm {e}-1\right )-3\,{\mathrm {e}}^{-1}\,\left (4\,\mathrm {e}-1\right )\right )+x\,\left ({\mathrm {e}}^{-2}\,\left (32\,{\mathrm {e}}^2-32\,\mathrm {e}+3\right )-3\,{\mathrm {e}}^{-2}\,{\left (\mathrm {e}-1\right )}^2+2\,{\mathrm {e}}^{-1}\,\left (\mathrm {e}-1\right )\,\left (6\,{\mathrm {e}}^{-1}\,\left (\mathrm {e}-1\right )-6\,{\mathrm {e}}^{-1}\,\left (4\,\mathrm {e}-1\right )\right )\right )+x^3-\frac {10\,{\mathrm {e}}^{-1}\,\left (3\,\mathrm {e}-3\,{\mathrm {e}}^2+{\mathrm {e}}^3-1\right )}{\mathrm {e}-{\mathrm {e}}^2+x\,{\mathrm {e}}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x + exp(1)*(2*x - 32*x^2 + 6*x^3 - 6) + exp(2)*(32*x^2 - 4*x - 24*x^3 + 3*x^4 + 3) + 3*x^2 + 3)/(exp(2)
*(x^2 - 2*x + 1) + exp(1)*(2*x - 2) + 1),x)

[Out]

x^2*(3*exp(-1)*(exp(1) - 1) - 3*exp(-1)*(4*exp(1) - 1)) + x*(exp(-2)*(32*exp(2) - 32*exp(1) + 3) - 3*exp(-2)*(
exp(1) - 1)^2 + 2*exp(-1)*(exp(1) - 1)*(6*exp(-1)*(exp(1) - 1) - 6*exp(-1)*(4*exp(1) - 1))) + x^3 - (10*exp(-1
)*(3*exp(1) - 3*exp(2) + exp(3) - 1))/(exp(1) - exp(2) + x*exp(2))

________________________________________________________________________________________

sympy [A]  time = 0.40, size = 44, normalized size = 1.52 \begin {gather*} x^{3} - 9 x^{2} + x \left (-7 + \frac {10}{e}\right ) + \frac {- 10 e^{3} - 30 e + 10 + 30 e^{2}}{x e^{3} - e^{3} + e^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((3*x**4-24*x**3+32*x**2-4*x+3)*exp(1)**2+(6*x**3-32*x**2+2*x-6)*exp(1)+3*x**2+2*x+3)/((x**2-2*x+1)*
exp(1)**2+(2*x-2)*exp(1)+1),x)

[Out]

x**3 - 9*x**2 + x*(-7 + 10*exp(-1)) + (-10*exp(3) - 30*E + 10 + 30*exp(2))/(x*exp(3) - exp(3) + exp(2))

________________________________________________________________________________________