\(\int \frac {-9+7 x+27 x^2+e^{-x} (5 x-3 x^2)+(-6-2 x+18 x^2+e^{-x} (2 x-x^2)) \log (x)+(-1-2 x+3 x^2) \log ^2(x)}{9+6 \log (x)+\log ^2(x)} \, dx\) [104]

   Optimal result
   Rubi [C] (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 = 81, antiderivative size = 25 \[ \int \frac {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{9+6 \log (x)+\log ^2(x)} \, dx=x \left (-1-x+x^2+\frac {\left (5+e^{-x}\right ) x}{3+\log (x)}\right ) \]

[Out]

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

Rubi [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 1.47 (sec) , antiderivative size = 167, normalized size of antiderivative = 6.68, number of steps used = 57, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {6873, 6874, 2334, 2336, 2209, 2343, 2346, 2407, 2413, 6617, 45, 2403, 2326} \[ \int \frac {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{9+6 \log (x)+\log ^2(x)} \, dx=-\frac {12 \operatorname {ExpIntegralEi}(2 (\log (x)+3))}{e^6}+\frac {162 \operatorname {ExpIntegralEi}(3 (\log (x)+3))}{e^9}-\frac {4 \log (x) \operatorname {ExpIntegralEi}(2 (\log (x)+3))}{e^6}+\frac {54 \log (x) \operatorname {ExpIntegralEi}(3 (\log (x)+3))}{e^9}+\frac {4 (\log (x)+3) \operatorname {ExpIntegralEi}(2 (\log (x)+3))}{e^6}-\frac {54 (\log (x)+3) \operatorname {ExpIntegralEi}(3 (\log (x)+3))}{e^9}+19 x^3-\frac {18 x^3 \log (x)}{\log (x)+3}-\frac {54 x^3}{\log (x)+3}-3 x^2+\frac {2 x^2 \log (x)}{\log (x)+3}+\frac {11 x^2}{\log (x)+3}-x+\frac {e^{-x} x (3 x+x \log (x))}{(\log (x)+3)^2} \]

[In]

Int[(-9 + 7*x + 27*x^2 + (5*x - 3*x^2)/E^x + (-6 - 2*x + 18*x^2 + (2*x - x^2)/E^x)*Log[x] + (-1 - 2*x + 3*x^2)
*Log[x]^2)/(9 + 6*Log[x] + Log[x]^2),x]

[Out]

-x - 3*x^2 + 19*x^3 - (12*ExpIntegralEi[2*(3 + Log[x])])/E^6 + (162*ExpIntegralEi[3*(3 + Log[x])])/E^9 - (4*Ex
pIntegralEi[2*(3 + Log[x])]*Log[x])/E^6 + (54*ExpIntegralEi[3*(3 + Log[x])]*Log[x])/E^9 + (11*x^2)/(3 + Log[x]
) - (54*x^3)/(3 + Log[x]) + (2*x^2*Log[x])/(3 + Log[x]) - (18*x^3*Log[x])/(3 + Log[x]) + (4*ExpIntegralEi[2*(3
 + Log[x])]*(3 + Log[x]))/E^6 - (54*ExpIntegralEi[3*(3 + Log[x])]*(3 + Log[x]))/E^9 + (x*(3*x + x*Log[x]))/(E^
x*(3 + Log[x])^2)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

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 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Simp[x*((a + b*Log[c*x^n])^(p + 1)/(b*n*(p + 1)))
, x] - Dist[1/(b*n*(p + 1)), Int[(a + b*Log[c*x^n])^(p + 1), x], x] /; FreeQ[{a, b, c, n}, x] && LtQ[p, -1] &&
 IntegerQ[2*p]

Rule 2336

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[1/(n*c^(1/n)), Subst[Int[E^(x/n)*(a + b*x)^p
, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[1/n]

Rule 2343

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

Rule 2346

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))^(p_)*(x_)^(m_.), x_Symbol] :> Dist[1/c^(m + 1), Subst[Int[E^((m + 1)*x)*(a
 + b*x)^p, x], x, Log[c*x]], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[m]

Rule 2403

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(Polyx_), x_Symbol] :> Int[ExpandIntegrand[Polyx*(a + b*Log[c*
x^n])^p, x], x] /; FreeQ[{a, b, c, n, p}, x] && PolynomialQ[Polyx, x]

Rule 2407

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(Log[(c_.)*(x_)^(n_.)]*(e_.) + (d_))^(q_.), x_Symbol] :> Int[E
xpandIntegrand[(a + b*Log[c*x^n])^p*(d + e*Log[c*x^n])^q, x], x] /; FreeQ[{a, b, c, d, e, n}, x] && IntegerQ[p
] && IntegerQ[q]

Rule 2413

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 6617

Int[ExpIntegralEi[(a_.) + (b_.)*(x_)], x_Symbol] :> Simp[(a + b*x)*(ExpIntegralEi[a + b*x]/b), x] - Simp[E^(a
+ b*x)/b, x] /; FreeQ[{a, b}, x]

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 {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{(3+\log (x))^2} \, dx \\ & = \int \left (-\frac {9}{(3+\log (x))^2}+\frac {7 x}{(3+\log (x))^2}+\frac {27 x^2}{(3+\log (x))^2}-\frac {6 \log (x)}{(3+\log (x))^2}-\frac {2 x \log (x)}{(3+\log (x))^2}+\frac {18 x^2 \log (x)}{(3+\log (x))^2}+\frac {(-1+x) (1+3 x) \log ^2(x)}{(3+\log (x))^2}-\frac {e^{-x} x (-5+3 x-2 \log (x)+x \log (x))}{(3+\log (x))^2}\right ) \, dx \\ & = -\left (2 \int \frac {x \log (x)}{(3+\log (x))^2} \, dx\right )-6 \int \frac {\log (x)}{(3+\log (x))^2} \, dx+7 \int \frac {x}{(3+\log (x))^2} \, dx-9 \int \frac {1}{(3+\log (x))^2} \, dx+18 \int \frac {x^2 \log (x)}{(3+\log (x))^2} \, dx+27 \int \frac {x^2}{(3+\log (x))^2} \, dx+\int \frac {(-1+x) (1+3 x) \log ^2(x)}{(3+\log (x))^2} \, dx-\int \frac {e^{-x} x (-5+3 x-2 \log (x)+x \log (x))}{(3+\log (x))^2} \, dx \\ & = -\frac {4 \operatorname {ExpIntegralEi}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \operatorname {ExpIntegralEi}(3 (3+\log (x))) \log (x)}{e^9}+\frac {9 x}{3+\log (x)}-\frac {7 x^2}{3+\log (x)}-\frac {27 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}+2 \int \left (\frac {2 \operatorname {ExpIntegralEi}(2 (3+\log (x)))}{e^6 x}-\frac {x}{3+\log (x)}\right ) \, dx-6 \int \left (-\frac {3}{(3+\log (x))^2}+\frac {1}{3+\log (x)}\right ) \, dx-9 \int \frac {1}{3+\log (x)} \, dx+14 \int \frac {x}{3+\log (x)} \, dx-18 \int \left (\frac {3 \operatorname {ExpIntegralEi}(3 (3+\log (x)))}{e^9 x}-\frac {x^2}{3+\log (x)}\right ) \, dx+81 \int \frac {x^2}{3+\log (x)} \, dx+\int \left ((-1+x) (1+3 x)+\frac {9 (-1+x) (1+3 x)}{(3+\log (x))^2}-\frac {6 (-1+x) (1+3 x)}{3+\log (x)}\right ) \, dx \\ & = -\frac {4 \operatorname {ExpIntegralEi}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \operatorname {ExpIntegralEi}(3 (3+\log (x))) \log (x)}{e^9}+\frac {9 x}{3+\log (x)}-\frac {7 x^2}{3+\log (x)}-\frac {27 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}-2 \int \frac {x}{3+\log (x)} \, dx-6 \int \frac {1}{3+\log (x)} \, dx-6 \int \frac {(-1+x) (1+3 x)}{3+\log (x)} \, dx+9 \int \frac {(-1+x) (1+3 x)}{(3+\log (x))^2} \, dx-9 \text {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )+14 \text {Subst}\left (\int \frac {e^{2 x}}{3+x} \, dx,x,\log (x)\right )+18 \int \frac {1}{(3+\log (x))^2} \, dx+18 \int \frac {x^2}{3+\log (x)} \, dx+81 \text {Subst}\left (\int \frac {e^{3 x}}{3+x} \, dx,x,\log (x)\right )-\frac {54 \int \frac {\operatorname {ExpIntegralEi}(3 (3+\log (x)))}{x} \, dx}{e^9}+\frac {4 \int \frac {\operatorname {ExpIntegralEi}(2 (3+\log (x)))}{x} \, dx}{e^6}+\int (-1+x) (1+3 x) \, dx \\ & = -\frac {9 \operatorname {ExpIntegralEi}(3+\log (x))}{e^3}+\frac {14 \operatorname {ExpIntegralEi}(2 (3+\log (x)))}{e^6}+\frac {81 \operatorname {ExpIntegralEi}(3 (3+\log (x)))}{e^9}-\frac {4 \operatorname {ExpIntegralEi}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \operatorname {ExpIntegralEi}(3 (3+\log (x))) \log (x)}{e^9}-\frac {9 x}{3+\log (x)}-\frac {7 x^2}{3+\log (x)}-\frac {27 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}-2 \text {Subst}\left (\int \frac {e^{2 x}}{3+x} \, dx,x,\log (x)\right )-6 \int \left (-\frac {1}{3+\log (x)}-\frac {2 x}{3+\log (x)}+\frac {3 x^2}{3+\log (x)}\right ) \, dx-6 \text {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )+9 \int \left (-\frac {1}{(3+\log (x))^2}-\frac {2 x}{(3+\log (x))^2}+\frac {3 x^2}{(3+\log (x))^2}\right ) \, dx+18 \int \frac {1}{3+\log (x)} \, dx+18 \text {Subst}\left (\int \frac {e^{3 x}}{3+x} \, dx,x,\log (x)\right )-\frac {54 \text {Subst}(\int \operatorname {ExpIntegralEi}(3 (3+x)) \, dx,x,\log (x))}{e^9}+\frac {4 \text {Subst}(\int \operatorname {ExpIntegralEi}(2 (3+x)) \, dx,x,\log (x))}{e^6}+\int \left (-1-2 x+3 x^2\right ) \, dx \\ & = -x-x^2+x^3-\frac {15 \operatorname {ExpIntegralEi}(3+\log (x))}{e^3}+\frac {12 \operatorname {ExpIntegralEi}(2 (3+\log (x)))}{e^6}+\frac {99 \operatorname {ExpIntegralEi}(3 (3+\log (x)))}{e^9}-\frac {4 \operatorname {ExpIntegralEi}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \operatorname {ExpIntegralEi}(3 (3+\log (x))) \log (x)}{e^9}-\frac {9 x}{3+\log (x)}-\frac {7 x^2}{3+\log (x)}-\frac {27 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}+6 \int \frac {1}{3+\log (x)} \, dx-9 \int \frac {1}{(3+\log (x))^2} \, dx+12 \int \frac {x}{3+\log (x)} \, dx-18 \int \frac {x}{(3+\log (x))^2} \, dx-18 \int \frac {x^2}{3+\log (x)} \, dx+18 \text {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )+27 \int \frac {x^2}{(3+\log (x))^2} \, dx-\frac {18 \text {Subst}(\int \operatorname {ExpIntegralEi}(x) \, dx,x,9+3 \log (x))}{e^9}+\frac {2 \text {Subst}(\int \operatorname {ExpIntegralEi}(x) \, dx,x,6+2 \log (x))}{e^6} \\ & = -x-3 x^2+19 x^3+\frac {3 \operatorname {ExpIntegralEi}(3+\log (x))}{e^3}+\frac {12 \operatorname {ExpIntegralEi}(2 (3+\log (x)))}{e^6}+\frac {99 \operatorname {ExpIntegralEi}(3 (3+\log (x)))}{e^9}-\frac {4 \operatorname {ExpIntegralEi}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \operatorname {ExpIntegralEi}(3 (3+\log (x))) \log (x)}{e^9}+\frac {11 x^2}{3+\log (x)}-\frac {54 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {4 \operatorname {ExpIntegralEi}(6+2 \log (x)) (3+\log (x))}{e^6}-\frac {54 \operatorname {ExpIntegralEi}(9+3 \log (x)) (3+\log (x))}{e^9}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}+6 \text {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )-9 \int \frac {1}{3+\log (x)} \, dx+12 \text {Subst}\left (\int \frac {e^{2 x}}{3+x} \, dx,x,\log (x)\right )-18 \text {Subst}\left (\int \frac {e^{3 x}}{3+x} \, dx,x,\log (x)\right )-36 \int \frac {x}{3+\log (x)} \, dx+81 \int \frac {x^2}{3+\log (x)} \, dx \\ & = -x-3 x^2+19 x^3+\frac {9 \operatorname {ExpIntegralEi}(3+\log (x))}{e^3}+\frac {24 \operatorname {ExpIntegralEi}(2 (3+\log (x)))}{e^6}+\frac {81 \operatorname {ExpIntegralEi}(3 (3+\log (x)))}{e^9}-\frac {4 \operatorname {ExpIntegralEi}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \operatorname {ExpIntegralEi}(3 (3+\log (x))) \log (x)}{e^9}+\frac {11 x^2}{3+\log (x)}-\frac {54 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {4 \operatorname {ExpIntegralEi}(6+2 \log (x)) (3+\log (x))}{e^6}-\frac {54 \operatorname {ExpIntegralEi}(9+3 \log (x)) (3+\log (x))}{e^9}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2}-9 \text {Subst}\left (\int \frac {e^x}{3+x} \, dx,x,\log (x)\right )-36 \text {Subst}\left (\int \frac {e^{2 x}}{3+x} \, dx,x,\log (x)\right )+81 \text {Subst}\left (\int \frac {e^{3 x}}{3+x} \, dx,x,\log (x)\right ) \\ & = -x-3 x^2+19 x^3-\frac {12 \operatorname {ExpIntegralEi}(2 (3+\log (x)))}{e^6}+\frac {162 \operatorname {ExpIntegralEi}(3 (3+\log (x)))}{e^9}-\frac {4 \operatorname {ExpIntegralEi}(2 (3+\log (x))) \log (x)}{e^6}+\frac {54 \operatorname {ExpIntegralEi}(3 (3+\log (x))) \log (x)}{e^9}+\frac {11 x^2}{3+\log (x)}-\frac {54 x^3}{3+\log (x)}+\frac {2 x^2 \log (x)}{3+\log (x)}-\frac {18 x^3 \log (x)}{3+\log (x)}+\frac {4 \operatorname {ExpIntegralEi}(6+2 \log (x)) (3+\log (x))}{e^6}-\frac {54 \operatorname {ExpIntegralEi}(9+3 \log (x)) (3+\log (x))}{e^9}+\frac {e^{-x} x (3 x+x \log (x))}{(3+\log (x))^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 5.10 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \frac {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{9+6 \log (x)+\log ^2(x)} \, dx=x \left (-1-x+x^2+\frac {\left (5+e^{-x}\right ) x}{3+\log (x)}\right ) \]

[In]

Integrate[(-9 + 7*x + 27*x^2 + (5*x - 3*x^2)/E^x + (-6 - 2*x + 18*x^2 + (2*x - x^2)/E^x)*Log[x] + (-1 - 2*x +
3*x^2)*Log[x]^2)/(9 + 6*Log[x] + Log[x]^2),x]

[Out]

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

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.16

method result size
risch \(x^{3}-x^{2}-x +\frac {x^{2} \left ({\mathrm e}^{-x}+5\right )}{3+\ln \left (x \right )}\) \(29\)
default \(\frac {5 x^{2}}{3+\ln \left (x \right )}-x -x^{2}+x^{3}+\frac {x^{2} {\mathrm e}^{-x}}{3+\ln \left (x \right )}\) \(38\)
parts \(\frac {5 x^{2}}{3+\ln \left (x \right )}-x -x^{2}+x^{3}+\frac {x^{2} {\mathrm e}^{-x}}{3+\ln \left (x \right )}\) \(38\)
norman \(\frac {x^{2} {\mathrm e}^{-x}+x^{3} \ln \left (x \right )-3 x +2 x^{2}+3 x^{3}-x \ln \left (x \right )-x^{2} \ln \left (x \right )}{3+\ln \left (x \right )}\) \(48\)
parallelrisch \(-\frac {-x^{3} \ln \left (x \right )-3 x^{3}+x^{2} \ln \left (x \right )-x^{2} {\mathrm e}^{-x}-2 x^{2}+x \ln \left (x \right )+3 x}{3+\ln \left (x \right )}\) \(49\)

[In]

int(((3*x^2-2*x-1)*ln(x)^2+((-x^2+2*x)*exp(-x)+18*x^2-2*x-6)*ln(x)+(-3*x^2+5*x)*exp(-x)+27*x^2+7*x-9)/(ln(x)^2
+6*ln(x)+9),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.76 \[ \int \frac {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{9+6 \log (x)+\log ^2(x)} \, dx=\frac {3 \, x^{3} + x^{2} e^{\left (-x\right )} + 2 \, x^{2} + {\left (x^{3} - x^{2} - x\right )} \log \left (x\right ) - 3 \, x}{\log \left (x\right ) + 3} \]

[In]

integrate(((3*x^2-2*x-1)*log(x)^2+((-x^2+2*x)*exp(-x)+18*x^2-2*x-6)*log(x)+(-3*x^2+5*x)*exp(-x)+27*x^2+7*x-9)/
(log(x)^2+6*log(x)+9),x, algorithm="fricas")

[Out]

(3*x^3 + x^2*e^(-x) + 2*x^2 + (x^3 - x^2 - x)*log(x) - 3*x)/(log(x) + 3)

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.16 \[ \int \frac {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{9+6 \log (x)+\log ^2(x)} \, dx=x^{3} - x^{2} + \frac {5 x^{2}}{\log {\left (x \right )} + 3} + \frac {x^{2} e^{- x}}{\log {\left (x \right )} + 3} - x \]

[In]

integrate(((3*x**2-2*x-1)*ln(x)**2+((-x**2+2*x)*exp(-x)+18*x**2-2*x-6)*ln(x)+(-3*x**2+5*x)*exp(-x)+27*x**2+7*x
-9)/(ln(x)**2+6*ln(x)+9),x)

[Out]

x**3 - x**2 + 5*x**2/(log(x) + 3) + x**2*exp(-x)/(log(x) + 3) - x

Maxima [F]

\[ \int \frac {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{9+6 \log (x)+\log ^2(x)} \, dx=\int { \frac {{\left (3 \, x^{2} - 2 \, x - 1\right )} \log \left (x\right )^{2} + 27 \, x^{2} - {\left (3 \, x^{2} - 5 \, x\right )} e^{\left (-x\right )} + {\left (18 \, x^{2} - {\left (x^{2} - 2 \, x\right )} e^{\left (-x\right )} - 2 \, x - 6\right )} \log \left (x\right ) + 7 \, x - 9}{\log \left (x\right )^{2} + 6 \, \log \left (x\right ) + 9} \,d x } \]

[In]

integrate(((3*x^2-2*x-1)*log(x)^2+((-x^2+2*x)*exp(-x)+18*x^2-2*x-6)*log(x)+(-3*x^2+5*x)*exp(-x)+27*x^2+7*x-9)/
(log(x)^2+6*log(x)+9),x, algorithm="maxima")

[Out]

9*e^(-3)*exp_integral_e(2, -log(x) - 3)/(log(x) + 3) - 7*e^(-6)*exp_integral_e(2, -2*log(x) - 6)/(log(x) + 3)
- 27*e^(-9)*exp_integral_e(2, -3*log(x) - 9)/(log(x) + 3) + (30*x^3 + x^2*e^(-x) + 9*x^2 + (x^3 - x^2 - x)*log
(x) - 12*x)/(log(x) + 3) - integrate((81*x^2 + 14*x - 9)/(log(x) + 3), x)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.88 \[ \int \frac {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{9+6 \log (x)+\log ^2(x)} \, dx=\frac {x^{3} \log \left (x\right ) + 3 \, x^{3} + x^{2} e^{\left (-x\right )} - x^{2} \log \left (x\right ) + 2 \, x^{2} - x \log \left (x\right ) - 3 \, x}{\log \left (x\right ) + 3} \]

[In]

integrate(((3*x^2-2*x-1)*log(x)^2+((-x^2+2*x)*exp(-x)+18*x^2-2*x-6)*log(x)+(-3*x^2+5*x)*exp(-x)+27*x^2+7*x-9)/
(log(x)^2+6*log(x)+9),x, algorithm="giac")

[Out]

(x^3*log(x) + 3*x^3 + x^2*e^(-x) - x^2*log(x) + 2*x^2 - x*log(x) - 3*x)/(log(x) + 3)

Mupad [B] (verification not implemented)

Time = 7.78 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.08 \[ \int \frac {-9+7 x+27 x^2+e^{-x} \left (5 x-3 x^2\right )+\left (-6-2 x+18 x^2+e^{-x} \left (2 x-x^2\right )\right ) \log (x)+\left (-1-2 x+3 x^2\right ) \log ^2(x)}{9+6 \log (x)+\log ^2(x)} \, dx=x^3-x+\frac {x^2\,\left ({\mathrm {e}}^{-x}-\ln \left (x\right )+2\right )}{\ln \left (x\right )+3} \]

[In]

int((7*x + exp(-x)*(5*x - 3*x^2) - log(x)^2*(2*x - 3*x^2 + 1) - log(x)*(2*x - exp(-x)*(2*x - x^2) - 18*x^2 + 6
) + 27*x^2 - 9)/(6*log(x) + log(x)^2 + 9),x)

[Out]

x^3 - x + (x^2*(exp(-x) - log(x) + 2))/(log(x) + 3)