3.78.25 \(\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\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.53, antiderivative size = 24, normalized size of antiderivative = 0.75, number of steps used = 6, number of rules used = 4, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {1593, 6742, 2194, 893} \begin {gather*} -3 x-e^{e^4-x}+\log (x)-\log (x+\log (3)) \end {gather*}

Antiderivative was successfully verified.

[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 893

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 1593

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 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 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 {-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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 24, normalized size = 0.75 \begin {gather*} -e^{e^4-x}-3 x+\log (x)-\log (x+\log (3)) \end {gather*}

Antiderivative was successfully verified.

[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]]

________________________________________________________________________________________

fricas [A]  time = 1.09, size = 22, normalized size = 0.69 \begin {gather*} -3 \, x - e^{\left (-x + e^{4}\right )} - \log \left (x + \log \relax (3)\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x*log(3)+x^2)*exp(exp(4)-x)+(-3*x+1)*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)

________________________________________________________________________________________

giac [A]  time = 0.22, size = 22, normalized size = 0.69 \begin {gather*} -3 \, x - e^{\left (-x + e^{4}\right )} - \log \left (x + \log \relax (3)\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.24, size = 23, normalized size = 0.72




method result size



norman \(-3 x -{\mathrm e}^{{\mathrm e}^{4}-x}-\ln \left (\ln \relax (3)+x \right )+\ln \relax (x )\) \(23\)
risch \(-3 x -{\mathrm e}^{{\mathrm e}^{4}-x}-\ln \left (\ln \relax (3)+x \right )+\ln \relax (x )\) \(23\)
derivativedivides \(\frac {2 \ln \relax (3) \arctanh \left (\frac {-\ln \relax (3)-2 x}{\sqrt {\ln \relax (3)^{2}}}\right )}{\sqrt {\ln \relax (3)^{2}}}-{\mathrm e}^{{\mathrm e}^{4}-x}+3 \,{\mathrm e}^{4}-3 x\) \(466\)
default \(\frac {2 \ln \relax (3) \arctanh \left (\frac {-\ln \relax (3)-2 x}{\sqrt {\ln \relax (3)^{2}}}\right )}{\sqrt {\ln \relax (3)^{2}}}-{\mathrm e}^{{\mathrm e}^{4}-x}+3 \,{\mathrm e}^{4}-3 x\) \(466\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x*ln(3)+x^2)*exp(exp(4)-x)+(-3*x+1)*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)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x*log(3)+x^2)*exp(exp(4)-x)+(-3*x+1)*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))

________________________________________________________________________________________

mupad [B]  time = 5.81, size = 22, normalized size = 0.69 \begin {gather*} \ln \relax (x)-{\mathrm {e}}^{{\mathrm {e}}^4-x}-\ln \left (x+\ln \relax (3)\right )-3\,x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 19, normalized size = 0.59 \begin {gather*} - 3 x - e^{- x + e^{4}} + \log {\relax (x )} - \log {\left (x + \log {\relax (3 )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________