\(\int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} (x^2+x \log (3))}{x^2+x \log (3)} \, dx\) [7725]

   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 = 43, antiderivative size = 32 \[ \int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} \left (x^2+x \log (3)\right )}{x^2+x \log (3)} \, dx=3-e^4-e^{e^4-x}-3 x-\log \left (1+\frac {\log (3)}{x}\right ) \]

[Out]

3-3*x-exp(4)-exp(exp(4)-x)-ln(1+ln(3)/x)

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.75, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {1607, 6874, 2225, 907} \[ \int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} \left (x^2+x \log (3)\right )}{x^2+x \log (3)} \, dx=-3 x-e^{e^4-x}+\log (x)-\log (x+\log (3)) \]

[In]

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

[Out]

-E^(E^4 - x) - 3*x + Log[x] - Log[x + Log[3]]

Rule 907

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} \left (x^2+x \log (3)\right )}{x (x+\log (3))} \, dx \\ & = \int \left (e^{e^4-x}+\frac {-3 x^2+\log (3)-3 x \log (3)}{x (x+\log (3))}\right ) \, dx \\ & = \int e^{e^4-x} \, dx+\int \frac {-3 x^2+\log (3)-3 x \log (3)}{x (x+\log (3))} \, dx \\ & = -e^{e^4-x}+\int \left (-3+\frac {1}{x}+\frac {1}{-x-\log (3)}\right ) \, dx \\ & = -e^{e^4-x}-3 x+\log (x)-\log (x+\log (3)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.75 \[ \int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} \left (x^2+x \log (3)\right )}{x^2+x \log (3)} \, dx=-e^{e^4-x}-3 x+\log (x)-\log (x+\log (3)) \]

[In]

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

[Out]

-E^(E^4 - x) - 3*x + Log[x] - Log[x + Log[3]]

Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.72

method result size
norman \(-3 x -{\mathrm e}^{{\mathrm e}^{4}-x}-\ln \left (\ln \left (3\right )+x \right )+\ln \left (x \right )\) \(23\)
risch \(-3 x -{\mathrm e}^{{\mathrm e}^{4}-x}-\ln \left (\ln \left (3\right )+x \right )+\ln \left (x \right )\) \(23\)
parallelrisch \(-3 x -{\mathrm e}^{{\mathrm e}^{4}-x}-\ln \left (\ln \left (3\right )+x \right )+\ln \left (x \right )\) \(23\)
parts \(-3 x -{\mathrm e}^{{\mathrm e}^{4}-x}-\ln \left (\ln \left (3\right )+x \right )+\ln \left (x \right )\) \(23\)
derivativedivides \(\text {Expression too large to display}\) \(2336\)
default \(\text {Expression too large to display}\) \(2336\)

[In]

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

[Out]

-3*x-exp(exp(4)-x)-ln(ln(3)+x)+ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.69 \[ \int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} \left (x^2+x \log (3)\right )}{x^2+x \log (3)} \, dx=-3 \, x - e^{\left (-x + e^{4}\right )} - \log \left (x + \log \left (3\right )\right ) + \log \left (x\right ) \]

[In]

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

[Out]

-3*x - e^(-x + e^4) - log(x + log(3)) + log(x)

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.59 \[ \int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} \left (x^2+x \log (3)\right )}{x^2+x \log (3)} \, dx=- 3 x - e^{- x + e^{4}} + \log {\left (x \right )} - \log {\left (x + \log {\left (3 \right )} \right )} \]

[In]

integrate(((x*ln(3)+x**2)*exp(exp(4)-x)+(1-3*x)*ln(3)-3*x**2)/(x*ln(3)+x**2),x)

[Out]

-3*x - exp(-x + exp(4)) + log(x) - log(x + log(3))

Maxima [F]

\[ \int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} \left (x^2+x \log (3)\right )}{x^2+x \log (3)} \, dx=\int { -\frac {3 \, x^{2} - {\left (x^{2} + x \log \left (3\right )\right )} e^{\left (-x + e^{4}\right )} + {\left (3 \, x - 1\right )} \log \left (3\right )}{x^{2} + x \log \left (3\right )} \,d x } \]

[In]

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

[Out]

-3*e^(e^4)*exp_integral_e(1, x + log(3))*log(3) - (log(x + log(3))/log(3) - log(x)/log(3))*log(3) + integrate(
e^(-x + e^4)/(x^2 + 2*x*log(3) + log(3)^2), x)*log(3) - 3*x - x*e^(-x + e^4)/(x + log(3))

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.88 \[ \int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} \left (x^2+x \log (3)\right )}{x^2+x \log (3)} \, dx=-3 \, x + 3 \, e^{4} - e^{\left (-x + e^{4}\right )} + \log \left (-x\right ) - \log \left (x + \log \left (3\right )\right ) \]

[In]

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

[Out]

-3*x + 3*e^4 - e^(-x + e^4) + log(-x) - log(x + log(3))

Mupad [B] (verification not implemented)

Time = 13.26 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.69 \[ \int \frac {-3 x^2+(1-3 x) \log (3)+e^{e^4-x} \left (x^2+x \log (3)\right )}{x^2+x \log (3)} \, dx=\ln \left (x\right )-{\mathrm {e}}^{{\mathrm {e}}^4-x}-\ln \left (x+\ln \left (3\right )\right )-3\,x \]

[In]

int(-(log(3)*(3*x - 1) + 3*x^2 - exp(exp(4) - x)*(x*log(3) + x^2))/(x*log(3) + x^2),x)

[Out]

log(x) - exp(exp(4) - x) - log(x + log(3)) - 3*x