\(\int \frac {-252+180 x+e^{2 x} (-50+150 x-150 x^2+50 x^3)+e^x (-270+630 x-510 x^2+150 x^3)}{-25+75 x-75 x^2+25 x^3} \, dx\) [1487]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 63, antiderivative size = 35 \[ \int \frac {-252+180 x+e^{2 x} \left (-50+150 x-150 x^2+50 x^3\right )+e^x \left (-270+630 x-510 x^2+150 x^3\right )}{-25+75 x-75 x^2+25 x^3} \, dx=\left (e^x+x-\frac {(-1+x)^2-x-\frac {5+x}{5 (1-x)}}{x}\right )^2 \]

[Out]

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

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.23, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {6820, 2225, 37, 2230, 2208, 2209} \[ \int \frac {-252+180 x+e^{2 x} \left (-50+150 x-150 x^2+50 x^3\right )+e^x \left (-270+630 x-510 x^2+150 x^3\right )}{-25+75 x-75 x^2+25 x^3} \, dx=\frac {9 (7-5 x)^2}{25 (1-x)^2}+6 e^x+e^{2 x}+\frac {12 e^x}{5 (1-x)} \]

[In]

Int[(-252 + 180*x + E^(2*x)*(-50 + 150*x - 150*x^2 + 50*x^3) + E^x*(-270 + 630*x - 510*x^2 + 150*x^3))/(-25 +
75*x - 75*x^2 + 25*x^3),x]

[Out]

6*E^x + E^(2*x) + (9*(7 - 5*x)^2)/(25*(1 - x)^2) + (12*E^x)/(5*(1 - x))

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 2208

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] &&  !TrueQ[$UseGamm
a]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2225

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 2230

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] &&  !TrueQ[$UseGamma]

Rule 6820

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

Rubi steps \begin{align*} \text {integral}& = \int \left (2 e^{2 x}+\frac {36 (-7+5 x)}{25 (-1+x)^3}+\frac {6 e^x \left (9-12 x+5 x^2\right )}{5 (-1+x)^2}\right ) \, dx \\ & = \frac {6}{5} \int \frac {e^x \left (9-12 x+5 x^2\right )}{(-1+x)^2} \, dx+\frac {36}{25} \int \frac {-7+5 x}{(-1+x)^3} \, dx+2 \int e^{2 x} \, dx \\ & = e^{2 x}+\frac {9 (7-5 x)^2}{25 (1-x)^2}+\frac {6}{5} \int \left (5 e^x+\frac {2 e^x}{(-1+x)^2}-\frac {2 e^x}{-1+x}\right ) \, dx \\ & = e^{2 x}+\frac {9 (7-5 x)^2}{25 (1-x)^2}+\frac {12}{5} \int \frac {e^x}{(-1+x)^2} \, dx-\frac {12}{5} \int \frac {e^x}{-1+x} \, dx+6 \int e^x \, dx \\ & = 6 e^x+e^{2 x}+\frac {9 (7-5 x)^2}{25 (1-x)^2}+\frac {12 e^x}{5 (1-x)}-\frac {12}{5} e \operatorname {ExpIntegralEi}(-1+x)+\frac {12}{5} \int \frac {e^x}{-1+x} \, dx \\ & = 6 e^x+e^{2 x}+\frac {9 (7-5 x)^2}{25 (1-x)^2}+\frac {12 e^x}{5 (1-x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.14 \[ \int \frac {-252+180 x+e^{2 x} \left (-50+150 x-150 x^2+50 x^3\right )+e^x \left (-270+630 x-510 x^2+150 x^3\right )}{-25+75 x-75 x^2+25 x^3} \, dx=e^{2 x}+\frac {6}{5} e^x \left (5-\frac {2}{-1+x}\right )+\frac {36}{25 (-1+x)^2}-\frac {36}{5 (-1+x)} \]

[In]

Integrate[(-252 + 180*x + E^(2*x)*(-50 + 150*x - 150*x^2 + 50*x^3) + E^x*(-270 + 630*x - 510*x^2 + 150*x^3))/(
-25 + 75*x - 75*x^2 + 25*x^3),x]

[Out]

E^(2*x) + (6*E^x*(5 - 2/(-1 + x)))/5 + 36/(25*(-1 + x)^2) - 36/(5*(-1 + x))

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.94

method result size
default \(\frac {36}{25 \left (-1+x \right )^{2}}-\frac {36}{5 \left (-1+x \right )}-\frac {12 \,{\mathrm e}^{x}}{5 \left (-1+x \right )}+6 \,{\mathrm e}^{x}+{\mathrm e}^{2 x}\) \(33\)
parts \(\frac {36}{25 \left (-1+x \right )^{2}}-\frac {36}{5 \left (-1+x \right )}-\frac {12 \,{\mathrm e}^{x}}{5 \left (-1+x \right )}+6 \,{\mathrm e}^{x}+{\mathrm e}^{2 x}\) \(33\)
risch \(\frac {-\frac {36 x}{5}+\frac {216}{25}}{x^{2}-2 x +1}+{\mathrm e}^{2 x}+\frac {6 \left (5 x -7\right ) {\mathrm e}^{x}}{5 \left (-1+x \right )}\) \(36\)
norman \(\frac {{\mathrm e}^{2 x}-\frac {36 x}{5}+{\mathrm e}^{2 x} x^{2}-2 x \,{\mathrm e}^{2 x}-\frac {72 \,{\mathrm e}^{x} x}{5}+6 \,{\mathrm e}^{x} x^{2}+\frac {42 \,{\mathrm e}^{x}}{5}+\frac {216}{25}}{\left (-1+x \right )^{2}}\) \(47\)
parallelrisch \(\frac {150 \,{\mathrm e}^{x} x^{2}+25 \,{\mathrm e}^{2 x} x^{2}-360 \,{\mathrm e}^{x} x -50 x \,{\mathrm e}^{2 x}+210 \,{\mathrm e}^{x}+25 \,{\mathrm e}^{2 x}-180 x +216}{25 x^{2}-50 x +25}\) \(56\)

[In]

int(((50*x^3-150*x^2+150*x-50)*exp(x)^2+(150*x^3-510*x^2+630*x-270)*exp(x)+180*x-252)/(25*x^3-75*x^2+75*x-25),
x,method=_RETURNVERBOSE)

[Out]

36/25/(-1+x)^2-36/5/(-1+x)-12/5/(-1+x)*exp(x)+6*exp(x)+exp(x)^2

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.29 \[ \int \frac {-252+180 x+e^{2 x} \left (-50+150 x-150 x^2+50 x^3\right )+e^x \left (-270+630 x-510 x^2+150 x^3\right )}{-25+75 x-75 x^2+25 x^3} \, dx=\frac {25 \, {\left (x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x\right )} + 30 \, {\left (5 \, x^{2} - 12 \, x + 7\right )} e^{x} - 180 \, x + 216}{25 \, {\left (x^{2} - 2 \, x + 1\right )}} \]

[In]

integrate(((50*x^3-150*x^2+150*x-50)*exp(x)^2+(150*x^3-510*x^2+630*x-270)*exp(x)+180*x-252)/(25*x^3-75*x^2+75*
x-25),x, algorithm="fricas")

[Out]

1/25*(25*(x^2 - 2*x + 1)*e^(2*x) + 30*(5*x^2 - 12*x + 7)*e^x - 180*x + 216)/(x^2 - 2*x + 1)

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.06 \[ \int \frac {-252+180 x+e^{2 x} \left (-50+150 x-150 x^2+50 x^3\right )+e^x \left (-270+630 x-510 x^2+150 x^3\right )}{-25+75 x-75 x^2+25 x^3} \, dx=\frac {216 - 180 x}{25 x^{2} - 50 x + 25} + \frac {\left (5 x - 5\right ) e^{2 x} + \left (30 x - 42\right ) e^{x}}{5 x - 5} \]

[In]

integrate(((50*x**3-150*x**2+150*x-50)*exp(x)**2+(150*x**3-510*x**2+630*x-270)*exp(x)+180*x-252)/(25*x**3-75*x
**2+75*x-25),x)

[Out]

(216 - 180*x)/(25*x**2 - 50*x + 25) + ((5*x - 5)*exp(2*x) + (30*x - 42)*exp(x))/(5*x - 5)

Maxima [F]

\[ \int \frac {-252+180 x+e^{2 x} \left (-50+150 x-150 x^2+50 x^3\right )+e^x \left (-270+630 x-510 x^2+150 x^3\right )}{-25+75 x-75 x^2+25 x^3} \, dx=\int { \frac {2 \, {\left (25 \, {\left (x^{3} - 3 \, x^{2} + 3 \, x - 1\right )} e^{\left (2 \, x\right )} + 15 \, {\left (5 \, x^{3} - 17 \, x^{2} + 21 \, x - 9\right )} e^{x} + 90 \, x - 126\right )}}{25 \, {\left (x^{3} - 3 \, x^{2} + 3 \, x - 1\right )}} \,d x } \]

[In]

integrate(((50*x^3-150*x^2+150*x-50)*exp(x)^2+(150*x^3-510*x^2+630*x-270)*exp(x)+180*x-252)/(25*x^3-75*x^2+75*
x-25),x, algorithm="maxima")

[Out]

1/5*(5*(x^3 - 3*x^2 + 3*x - 1)*e^(2*x) + 6*(5*x^3 - 17*x^2 + 19*x)*e^x)/(x^3 - 3*x^2 + 3*x - 1) - 18/5*(2*x -
1)/(x^2 - 2*x + 1) + 54/5*e*exp_integral_e(3, -x + 1)/(x - 1)^2 + 126/25/(x^2 - 2*x + 1) + 2/25*integrate(15*(
2*x + 19)*e^x/(x^4 - 4*x^3 + 6*x^2 - 4*x + 1), x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.57 \[ \int \frac {-252+180 x+e^{2 x} \left (-50+150 x-150 x^2+50 x^3\right )+e^x \left (-270+630 x-510 x^2+150 x^3\right )}{-25+75 x-75 x^2+25 x^3} \, dx=\frac {25 \, x^{2} e^{\left (2 \, x\right )} + 150 \, x^{2} e^{x} - 50 \, x e^{\left (2 \, x\right )} - 360 \, x e^{x} - 180 \, x + 25 \, e^{\left (2 \, x\right )} + 210 \, e^{x} + 216}{25 \, {\left (x^{2} - 2 \, x + 1\right )}} \]

[In]

integrate(((50*x^3-150*x^2+150*x-50)*exp(x)^2+(150*x^3-510*x^2+630*x-270)*exp(x)+180*x-252)/(25*x^3-75*x^2+75*
x-25),x, algorithm="giac")

[Out]

1/25*(25*x^2*e^(2*x) + 150*x^2*e^x - 50*x*e^(2*x) - 360*x*e^x - 180*x + 25*e^(2*x) + 210*e^x + 216)/(x^2 - 2*x
 + 1)

Mupad [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.86 \[ \int \frac {-252+180 x+e^{2 x} \left (-50+150 x-150 x^2+50 x^3\right )+e^x \left (-270+630 x-510 x^2+150 x^3\right )}{-25+75 x-75 x^2+25 x^3} \, dx={\mathrm {e}}^{2\,x}+6\,{\mathrm {e}}^x+\frac {\frac {12\,{\mathrm {e}}^x}{5}-x\,\left (\frac {12\,{\mathrm {e}}^x}{5}+\frac {36}{5}\right )+\frac {216}{25}}{{\left (x-1\right )}^2} \]

[In]

int((180*x + exp(2*x)*(150*x - 150*x^2 + 50*x^3 - 50) + exp(x)*(630*x - 510*x^2 + 150*x^3 - 270) - 252)/(75*x
- 75*x^2 + 25*x^3 - 25),x)

[Out]

exp(2*x) + 6*exp(x) + ((12*exp(x))/5 - x*((12*exp(x))/5 + 36/5) + 216/25)/(x - 1)^2