3.11.87 \(\int \frac {-3+e^x (-3-e^3)+e^3 (-1+x)+3 x}{x+e^x x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.29, antiderivative size = 30, normalized size of antiderivative = 1.36, number of steps used = 8, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {6688, 12, 6742, 2282, 36, 29, 31} \begin {gather*} \left (3+e^3\right ) x-\left (3+e^3\right ) \log \left (e^x+1\right )-\left (3+e^3\right ) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

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

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

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

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2282

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 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, 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 {\left (3+e^3\right ) \left (-1-e^x+x\right )}{\left (1+e^x\right ) x} \, dx\\ &=\left (3+e^3\right ) \int \frac {-1-e^x+x}{\left (1+e^x\right ) x} \, dx\\ &=\left (3+e^3\right ) \int \left (\frac {1}{1+e^x}-\frac {1}{x}\right ) \, dx\\ &=-\left (\left (3+e^3\right ) \log (x)\right )+\left (3+e^3\right ) \int \frac {1}{1+e^x} \, dx\\ &=-\left (\left (3+e^3\right ) \log (x)\right )+\left (3+e^3\right ) \operatorname {Subst}\left (\int \frac {1}{x (1+x)} \, dx,x,e^x\right )\\ &=-\left (\left (3+e^3\right ) \log (x)\right )+\left (-3-e^3\right ) \operatorname {Subst}\left (\int \frac {1}{1+x} \, dx,x,e^x\right )+\left (3+e^3\right ) \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )\\ &=\left (3+e^3\right ) x-\left (3+e^3\right ) \log \left (1+e^x\right )-\left (3+e^3\right ) \log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 19, normalized size = 0.86 \begin {gather*} -\left (\left (3+e^3\right ) \left (-x+\log \left (1+e^x\right )+\log (x)\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.82, size = 27, normalized size = 1.23 \begin {gather*} x e^{3} - {\left (e^{3} + 3\right )} \log \relax (x) - {\left (e^{3} + 3\right )} \log \left (e^{x} + 1\right ) + 3 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.32, size = 34, normalized size = 1.55 \begin {gather*} x e^{3} - e^{3} \log \relax (x) - e^{3} \log \left (e^{x} + 1\right ) + 3 \, x - 3 \, \log \relax (x) - 3 \, \log \left (e^{x} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 29, normalized size = 1.32




method result size



norman \(\left ({\mathrm e}^{3}+3\right ) x +\left (-{\mathrm e}^{3}-3\right ) \ln \relax (x )+\left (-{\mathrm e}^{3}-3\right ) \ln \left ({\mathrm e}^{x}+1\right )\) \(29\)
risch \(-\ln \relax (x ) {\mathrm e}^{3}-3 \ln \relax (x )+x \,{\mathrm e}^{3}+3 x -{\mathrm e}^{3} \ln \left ({\mathrm e}^{x}+1\right )-3 \ln \left ({\mathrm e}^{x}+1\right )\) \(35\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-exp(3)-3)*exp(x)+(x-1)*exp(3)+3*x-3)/(exp(x)*x+x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 26, normalized size = 1.18 \begin {gather*} x {\left (e^{3} + 3\right )} - {\left (e^{3} + 3\right )} \log \relax (x) - {\left (e^{3} + 3\right )} \log \left (e^{x} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 16, normalized size = 0.73 \begin {gather*} \left (x-\ln \left (x\,\left ({\mathrm {e}}^x+1\right )\right )\right )\,\left ({\mathrm {e}}^3+3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x - exp(x)*(exp(3) + 3) + exp(3)*(x - 1) - 3)/(x + x*exp(x)),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 29, normalized size = 1.32 \begin {gather*} x \left (3 + e^{3}\right ) + \left (- e^{3} - 3\right ) \log {\relax (x )} + \left (- e^{3} - 3\right ) \log {\left (e^{x} + 1 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________