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

Optimal. Leaf size=26 \[ 3-x+x^2-\left (2+\log \left (3-e^{e^x}+\log (3)\right )\right )^2 \]

[Out]

x^2-x+3-(2+ln(-exp(exp(x))+3+ln(3)))^2

________________________________________________________________________________________

Rubi [A]
time = 0.64, antiderivative size = 25, normalized size of antiderivative = 0.96, number of steps used = 7, number of rules used = 5, integrand size = 64, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.078, Rules used = {6873, 6874, 2320, 2437, 2338} \begin {gather*} x^2-x-\left (\log \left (-e^{e^x}+3+\log (3)\right )+2\right )^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + x^2 - (2 + Log[3 - E^E^x + Log[3]])^2

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 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2437

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[(f*(x/d))^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

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 {gather*} \begin {aligned} \text {integral} &=\int \frac {3-6 x+e^{e^x} \left (-1-4 e^x+2 x\right )+(1-2 x) \log (3)-2 e^{e^x+x} \log \left (3-e^{e^x}+\log (3)\right )}{e^{e^x}-3 \left (1+\frac {\log (3)}{3}\right )} \, dx\\ &=\int \left (-1+2 x+\frac {2 e^{e^x+x} \left (-2-\log \left (3-e^{e^x}+\log (3)\right )\right )}{e^{e^x}-3 \left (1+\frac {\log (3)}{3}\right )}\right ) \, dx\\ &=-x+x^2+2 \int \frac {e^{e^x+x} \left (-2-\log \left (3-e^{e^x}+\log (3)\right )\right )}{e^{e^x}-3 \left (1+\frac {\log (3)}{3}\right )} \, dx\\ &=-x+x^2+2 \text {Subst}\left (\int \frac {e^x \left (-2-\log \left (3-e^x+\log (3)\right )\right )}{e^x-3 \left (1+\frac {\log (3)}{3}\right )} \, dx,x,e^x\right )\\ &=-x+x^2+2 \text {Subst}\left (\int \frac {2+\log (3-x+\log (3))}{3-x+\log (3)} \, dx,x,e^{e^x}\right )\\ &=-x+x^2-2 \text {Subst}\left (\int \frac {2+\log (x)}{x} \, dx,x,3-e^{e^x}+\log (3)\right )\\ &=-x+x^2-\left (2+\log \left (3-e^{e^x}+\log (3)\right )\right )^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.27, size = 46, normalized size = 1.77 \begin {gather*} (-1+x) x-\frac {(12+\log (81)) \log \left (3-e^{e^x}+\log (3)\right )}{3+\log (3)}-\log ^2\left (3-e^{e^x}+\log (3)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 9.43, size = 34, normalized size = 1.31

method result size
default \(x^{2}-x -\ln \left (-{\mathrm e}^{{\mathrm e}^{x}}+3+\ln \left (3\right )\right )^{2}-4 \ln \left (-{\mathrm e}^{{\mathrm e}^{x}}+3+\ln \left (3\right )\right )\) \(34\)
norman \(x^{2}-x -\ln \left (-{\mathrm e}^{{\mathrm e}^{x}}+3+\ln \left (3\right )\right )^{2}-4 \ln \left (-{\mathrm e}^{{\mathrm e}^{x}}+3+\ln \left (3\right )\right )\) \(34\)
risch \(-\ln \left (-{\mathrm e}^{{\mathrm e}^{x}}+3+\ln \left (3\right )\right )^{2}+x^{2}-x -4 \ln \left ({\mathrm e}^{{\mathrm e}^{x}}-\ln \left (3\right )-3\right )\) \(34\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.54, size = 33, normalized size = 1.27 \begin {gather*} x^{2} - \log \left (-e^{\left (e^{x}\right )} + \log \left (3\right ) + 3\right )^{2} - x - 4 \, \log \left (-e^{\left (e^{x}\right )} + \log \left (3\right ) + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 55 vs. \(2 (24) = 48\).
time = 0.36, size = 55, normalized size = 2.12 \begin {gather*} x^{2} - \log \left ({\left ({\left (\log \left (3\right ) + 3\right )} e^{x} - e^{\left (x + e^{x}\right )}\right )} e^{\left (-x\right )}\right )^{2} - x - 4 \, \log \left ({\left ({\left (\log \left (3\right ) + 3\right )} e^{x} - e^{\left (x + e^{x}\right )}\right )} e^{\left (-x\right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.20, size = 31, normalized size = 1.19 \begin {gather*} x^{2} - x - \log {\left (- e^{e^{x}} + \log {\left (3 \right )} + 3 \right )}^{2} - 4 \log {\left (e^{e^{x}} - 3 - \log {\left (3 \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 33, normalized size = 1.27 \begin {gather*} x^{2} - \log \left (-e^{\left (e^{x}\right )} + \log \left (3\right ) + 3\right )^{2} - x - 4 \, \log \left (-e^{\left (e^{x}\right )} + \log \left (3\right ) + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 3.93, size = 43, normalized size = 1.65 \begin {gather*} x^2-{\ln \left (\ln \left (3\right )-{\mathrm {e}}^{{\mathrm {e}}^x}+3\right )}^2-x-\frac {\ln \left ({\mathrm {e}}^{{\mathrm {e}}^x}-\ln \left (3\right )-3\right )\,\left (\ln \left (81\right )+12\right )}{\ln \left (3\right )+3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________