\(\int \frac {468-432 x+81 x^2+e^{2 x} (52+9 x^2)+e^x (312-144 x+126 x^2)}{27+18 e^x+3 e^{2 x}} \, dx\) [2430]

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

Optimal result

Integrand size = 54, antiderivative size = 28 \[ \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{27+18 e^x+3 e^{2 x}} \, dx=x \left ((4+x)^2+2 \left (\frac {2}{3}-4 \left (x+\frac {3 x}{3+e^x}\right )\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.75, number of steps used = 26, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {6873, 12, 6874, 2215, 2221, 2317, 2438, 2611, 2320, 6724, 2216, 2222} \[ \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{27+18 e^x+3 e^{2 x}} \, dx=x^3-\frac {24 x^2}{e^x+3}+\frac {52 x}{3} \]

[In]

Int[(468 - 432*x + 81*x^2 + E^(2*x)*(52 + 9*x^2) + E^x*(312 - 144*x + 126*x^2))/(27 + 18*E^x + 3*E^(2*x)),x]

[Out]

(52*x)/3 - (24*x^2)/(3 + E^x) + x^3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2215

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[(c
+ d*x)^(m + 1)/(a*d*(m + 1)), x] - Dist[b/a, Int[(c + d*x)^m*((F^(g*(e + f*x)))^n/(a + b*(F^(g*(e + f*x)))^n))
, x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2216

Int[((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.))^(p_)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Dis
t[1/a, Int[(c + d*x)^m*(a + b*(F^(g*(e + f*x)))^n)^(p + 1), x], x] - Dist[b/a, Int[(c + d*x)^m*(F^(g*(e + f*x)
))^n*(a + b*(F^(g*(e + f*x)))^n)^p, x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && ILtQ[p, 0] && IGtQ[m, 0
]

Rule 2221

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
 - Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2222

Int[((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((a_.) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.))^(p_.)*
((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*((a + b*(F^(g*(e + f*x)))^n)^(p + 1)/(b*f*g*n*(p + 1
)*Log[F])), x] - Dist[d*(m/(b*f*g*n*(p + 1)*Log[F])), Int[(c + d*x)^(m - 1)*(a + b*(F^(g*(e + f*x)))^n)^(p + 1
), x], x] /; FreeQ[{F, a, b, c, d, e, f, g, m, n, p}, x] && NeQ[p, -1]

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2320

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 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2611

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(
f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Dist[g*(m/(b*c*n*Log[F])), Int[(f + g*
x)^(m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rule 6873

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{3 \left (3+e^x\right )^2} \, dx \\ & = \frac {1}{3} \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{\left (3+e^x\right )^2} \, dx \\ & = \frac {1}{3} \int \left (52+\frac {72 (-2+x) x}{3+e^x}+9 x^2-\frac {216 x^2}{\left (3+e^x\right )^2}\right ) \, dx \\ & = \frac {52 x}{3}+x^3+24 \int \frac {(-2+x) x}{3+e^x} \, dx-72 \int \frac {x^2}{\left (3+e^x\right )^2} \, dx \\ & = \frac {52 x}{3}+x^3+24 \int \frac {e^x x^2}{\left (3+e^x\right )^2} \, dx-24 \int \frac {x^2}{3+e^x} \, dx+24 \int \left (-\frac {2 x}{3+e^x}+\frac {x^2}{3+e^x}\right ) \, dx \\ & = \frac {52 x}{3}-\frac {24 x^2}{3+e^x}-\frac {5 x^3}{3}+8 \int \frac {e^x x^2}{3+e^x} \, dx+24 \int \frac {x^2}{3+e^x} \, dx \\ & = \frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3+8 x^2 \log \left (1+\frac {e^x}{3}\right )-8 \int \frac {e^x x^2}{3+e^x} \, dx-16 \int x \log \left (1+\frac {e^x}{3}\right ) \, dx \\ & = \frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3+16 x \operatorname {PolyLog}\left (2,-\frac {e^x}{3}\right )+16 \int x \log \left (1+\frac {e^x}{3}\right ) \, dx-16 \int \operatorname {PolyLog}\left (2,-\frac {e^x}{3}\right ) \, dx \\ & = \frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3+16 \int \operatorname {PolyLog}\left (2,-\frac {e^x}{3}\right ) \, dx-16 \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,-\frac {x}{3}\right )}{x} \, dx,x,e^x\right ) \\ & = \frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3-16 \operatorname {PolyLog}\left (3,-\frac {e^x}{3}\right )+16 \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,-\frac {x}{3}\right )}{x} \, dx,x,e^x\right ) \\ & = \frac {52 x}{3}-\frac {24 x^2}{3+e^x}+x^3 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.47 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.89 \[ \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{27+18 e^x+3 e^{2 x}} \, dx=\frac {1}{3} \left (52 x-\frac {72 x^2}{3+e^x}+3 x^3\right ) \]

[In]

Integrate[(468 - 432*x + 81*x^2 + E^(2*x)*(52 + 9*x^2) + E^x*(312 - 144*x + 126*x^2))/(27 + 18*E^x + 3*E^(2*x)
),x]

[Out]

(52*x - (72*x^2)/(3 + E^x) + 3*x^3)/3

Maple [A] (verified)

Time = 0.22 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.68

method result size
risch \(x^{3}+\frac {52 x}{3}-\frac {24 x^{2}}{3+{\mathrm e}^{x}}\) \(19\)
norman \(\frac {{\mathrm e}^{x} x^{3}+52 x -24 x^{2}+3 x^{3}+\frac {52 \,{\mathrm e}^{x} x}{3}}{3+{\mathrm e}^{x}}\) \(33\)
parallelrisch \(\frac {3 \,{\mathrm e}^{x} x^{3}+9 x^{3}-72 x^{2}+52 \,{\mathrm e}^{x} x +156 x}{3 \,{\mathrm e}^{x}+9}\) \(35\)

[In]

int(((9*x^2+52)*exp(x)^2+(126*x^2-144*x+312)*exp(x)+81*x^2-432*x+468)/(3*exp(x)^2+18*exp(x)+27),x,method=_RETU
RNVERBOSE)

[Out]

x^3+52/3*x-24*x^2/(3+exp(x))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.21 \[ \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{27+18 e^x+3 e^{2 x}} \, dx=\frac {9 \, x^{3} - 72 \, x^{2} + {\left (3 \, x^{3} + 52 \, x\right )} e^{x} + 156 \, x}{3 \, {\left (e^{x} + 3\right )}} \]

[In]

integrate(((9*x^2+52)*exp(x)^2+(126*x^2-144*x+312)*exp(x)+81*x^2-432*x+468)/(3*exp(x)^2+18*exp(x)+27),x, algor
ithm="fricas")

[Out]

1/3*(9*x^3 - 72*x^2 + (3*x^3 + 52*x)*e^x + 156*x)/(e^x + 3)

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.61 \[ \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{27+18 e^x+3 e^{2 x}} \, dx=x^{3} - \frac {24 x^{2}}{e^{x} + 3} + \frac {52 x}{3} \]

[In]

integrate(((9*x**2+52)*exp(x)**2+(126*x**2-144*x+312)*exp(x)+81*x**2-432*x+468)/(3*exp(x)**2+18*exp(x)+27),x)

[Out]

x**3 - 24*x**2/(exp(x) + 3) + 52*x/3

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.32 \[ \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{27+18 e^x+3 e^{2 x}} \, dx=\frac {52}{3} \, x + \frac {x^{3} e^{x} + 3 \, x^{3} - 24 \, x^{2} - 52}{e^{x} + 3} + \frac {52}{e^{x} + 3} \]

[In]

integrate(((9*x^2+52)*exp(x)^2+(126*x^2-144*x+312)*exp(x)+81*x^2-432*x+468)/(3*exp(x)^2+18*exp(x)+27),x, algor
ithm="maxima")

[Out]

52/3*x + (x^3*e^x + 3*x^3 - 24*x^2 - 52)/(e^x + 3) + 52/(e^x + 3)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.21 \[ \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{27+18 e^x+3 e^{2 x}} \, dx=\frac {3 \, x^{3} e^{x} + 9 \, x^{3} - 72 \, x^{2} + 52 \, x e^{x} + 156 \, x}{3 \, {\left (e^{x} + 3\right )}} \]

[In]

integrate(((9*x^2+52)*exp(x)^2+(126*x^2-144*x+312)*exp(x)+81*x^2-432*x+468)/(3*exp(x)^2+18*exp(x)+27),x, algor
ithm="giac")

[Out]

1/3*(3*x^3*e^x + 9*x^3 - 72*x^2 + 52*x*e^x + 156*x)/(e^x + 3)

Mupad [B] (verification not implemented)

Time = 9.78 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.64 \[ \int \frac {468-432 x+81 x^2+e^{2 x} \left (52+9 x^2\right )+e^x \left (312-144 x+126 x^2\right )}{27+18 e^x+3 e^{2 x}} \, dx=\frac {52\,x}{3}-\frac {24\,x^2}{{\mathrm {e}}^x+3}+x^3 \]

[In]

int((exp(2*x)*(9*x^2 + 52) - 432*x + exp(x)*(126*x^2 - 144*x + 312) + 81*x^2 + 468)/(3*exp(2*x) + 18*exp(x) +
27),x)

[Out]

(52*x)/3 - (24*x^2)/(exp(x) + 3) + x^3