3.50.57 \(\int \frac {1-6 x+3 x^2+e^x (-2-2 x+2 x^2)+e^{4 x} (-2-8 x+8 x^2+e^x (-12+10 x))}{1-2 x+x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.39, antiderivative size = 65, normalized size of antiderivative = 3.10, number of steps used = 18, number of rules used = 8, integrand size = 60, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {27, 6742, 2197, 2199, 2194, 2177, 2178, 683} \begin {gather*} 3 x+2 e^x+2 e^{4 x}-\frac {2 e^x}{1-x}-\frac {2 e^{4 x}}{1-x}-\frac {2 e^{5 x}}{1-x}-\frac {2}{1-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 - 6*x + 3*x^2 + E^x*(-2 - 2*x + 2*x^2) + E^(4*x)*(-2 - 8*x + 8*x^2 + E^x*(-12 + 10*x)))/(1 - 2*x + x^2)
,x]

[Out]

2*E^x + 2*E^(4*x) - 2/(1 - x) - (2*E^x)/(1 - x) - (2*E^(4*x))/(1 - x) - (2*E^(5*x))/(1 - x) + 3*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 683

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rule 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), 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] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$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]

Rule 2197

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[(g*u^(m + 1)*F^(c*v))/(b*c
*e*Log[F]), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

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-6 x+3 x^2+e^x \left (-2-2 x+2 x^2\right )+e^{4 x} \left (-2-8 x+8 x^2+e^x (-12+10 x)\right )}{(-1+x)^2} \, dx\\ &=\int \left (\frac {2 e^{5 x} (-6+5 x)}{(-1+x)^2}+\frac {2 e^x \left (-1-x+x^2\right )}{(-1+x)^2}+\frac {1-6 x+3 x^2}{(-1+x)^2}+\frac {2 e^{4 x} \left (-1-4 x+4 x^2\right )}{(-1+x)^2}\right ) \, dx\\ &=2 \int \frac {e^{5 x} (-6+5 x)}{(-1+x)^2} \, dx+2 \int \frac {e^x \left (-1-x+x^2\right )}{(-1+x)^2} \, dx+2 \int \frac {e^{4 x} \left (-1-4 x+4 x^2\right )}{(-1+x)^2} \, dx+\int \frac {1-6 x+3 x^2}{(-1+x)^2} \, dx\\ &=-\frac {2 e^{5 x}}{1-x}+2 \int \left (e^x-\frac {e^x}{(-1+x)^2}+\frac {e^x}{-1+x}\right ) \, dx+2 \int \left (4 e^{4 x}-\frac {e^{4 x}}{(-1+x)^2}+\frac {4 e^{4 x}}{-1+x}\right ) \, dx+\int \left (3-\frac {2}{(-1+x)^2}\right ) \, dx\\ &=-\frac {2}{1-x}-\frac {2 e^{5 x}}{1-x}+3 x+2 \int e^x \, dx-2 \int \frac {e^x}{(-1+x)^2} \, dx-2 \int \frac {e^{4 x}}{(-1+x)^2} \, dx+2 \int \frac {e^x}{-1+x} \, dx+8 \int e^{4 x} \, dx+8 \int \frac {e^{4 x}}{-1+x} \, dx\\ &=2 e^x+2 e^{4 x}-\frac {2}{1-x}-\frac {2 e^x}{1-x}-\frac {2 e^{4 x}}{1-x}-\frac {2 e^{5 x}}{1-x}+3 x+8 e^4 \text {Ei}(-4 (1-x))+2 e \text {Ei}(-1+x)-2 \int \frac {e^x}{-1+x} \, dx-8 \int \frac {e^{4 x}}{-1+x} \, dx\\ &=2 e^x+2 e^{4 x}-\frac {2}{1-x}-\frac {2 e^x}{1-x}-\frac {2 e^{4 x}}{1-x}-\frac {2 e^{5 x}}{1-x}+3 x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 37, normalized size = 1.76 \begin {gather*} \frac {2+2 e^{5 x}-3 x+2 e^x x+2 e^{4 x} x+3 x^2}{-1+x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 - 6*x + 3*x^2 + E^x*(-2 - 2*x + 2*x^2) + E^(4*x)*(-2 - 8*x + 8*x^2 + E^x*(-12 + 10*x)))/(1 - 2*x
+ x^2),x]

[Out]

(2 + 2*E^(5*x) - 3*x + 2*E^x*x + 2*E^(4*x)*x + 3*x^2)/(-1 + x)

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 34, normalized size = 1.62 \begin {gather*} \frac {3 \, x^{2} + 2 \, x e^{\left (4 \, x\right )} + 2 \, x e^{x} - 3 \, x + 2 \, e^{\left (5 \, x\right )} + 2}{x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.20, size = 34, normalized size = 1.62 \begin {gather*} \frac {3 \, x^{2} + 2 \, x e^{\left (4 \, x\right )} + 2 \, x e^{x} - 3 \, x + 2 \, e^{\left (5 \, x\right )} + 2}{x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.20, size = 32, normalized size = 1.52




method result size



norman \(\frac {3 x^{2}+2 \,{\mathrm e}^{5 x}+2 x \,{\mathrm e}^{4 x}+2 \,{\mathrm e}^{x} x -1}{x -1}\) \(32\)
risch \(\frac {2}{x -1}+3 x +\frac {2 \,{\mathrm e}^{5 x}}{x -1}+\frac {2 x \,{\mathrm e}^{4 x}}{x -1}+\frac {2 x \,{\mathrm e}^{x}}{x -1}\) \(45\)
default \(\frac {2}{x -1}+3 x +\frac {2 \,{\mathrm e}^{x}}{x -1}+\frac {2 \,{\mathrm e}^{4 x}}{x -1}+\frac {2 \,{\mathrm e}^{5 x}}{x -1}+2 \,{\mathrm e}^{4 x}+2 \,{\mathrm e}^{x}\) \(53\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((10*x-12)*exp(x)+8*x^2-8*x-2)*exp(4*x)+(2*x^2-2*x-2)*exp(x)+3*x^2-6*x+1)/(x^2-2*x+1),x,method=_RETURNVER
BOSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} 3 \, x + \frac {2 \, e E_{2}\left (-x + 1\right )}{x - 1} + \frac {2 \, {\left (x e^{\left (4 \, x\right )} + x e^{x} + e^{\left (5 \, x\right )}\right )}}{x - 1} + \frac {2}{x - 1} + 2 \, \int \frac {e^{x}}{x^{2} - 2 \, x + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3*x + 2*e*exp_integral_e(2, -x + 1)/(x - 1) + 2*(x*e^(4*x) + x*e^x + e^(5*x))/(x - 1) + 2/(x - 1) + 2*integrat
e(e^x/(x^2 - 2*x + 1), x)

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 33, normalized size = 1.57 \begin {gather*} \frac {2\,{\mathrm {e}}^{5\,x}-x+2\,x\,{\mathrm {e}}^{4\,x}+2\,x\,{\mathrm {e}}^x+3\,x^2}{x-1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(6*x + exp(4*x)*(8*x - exp(x)*(10*x - 12) - 8*x^2 + 2) + exp(x)*(2*x - 2*x^2 + 2) - 3*x^2 - 1)/(x^2 - 2*x
 + 1),x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.18, size = 71, normalized size = 3.38 \begin {gather*} 3 x + \frac {\left (2 x^{2} - 4 x + 2\right ) e^{5 x} + \left (2 x^{3} - 4 x^{2} + 2 x\right ) e^{4 x} + \left (2 x^{3} - 4 x^{2} + 2 x\right ) e^{x}}{x^{3} - 3 x^{2} + 3 x - 1} + \frac {2}{x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((10*x-12)*exp(x)+8*x**2-8*x-2)*exp(4*x)+(2*x**2-2*x-2)*exp(x)+3*x**2-6*x+1)/(x**2-2*x+1),x)

[Out]

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

________________________________________________________________________________________