3.93.5 \(\int \frac {-1-e^x x^2 \log (2)+(-1+2 x-x^2) \log (2)+\log (x)}{x^2 \log (2)} \, dx\)

Optimal. Leaf size=28 \[ 5-e^x+\frac {1}{x}-x-\frac {\log (x)}{x \log (2)}+\log \left (x^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 33, normalized size of antiderivative = 1.18, number of steps used = 9, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {12, 14, 2194, 2304} \begin {gather*} -x-e^x+\frac {\log (4) \log (x)}{\log (2)}-\frac {\log \left (\frac {x}{2}\right )}{x \log (2)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

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

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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 2304

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 34, normalized size = 1.21 \begin {gather*} \frac {-e^x \log (2)-x \log (2)-\frac {\log \left (\frac {x}{2}\right )}{x}+\log (4) \log (x)}{\log (2)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.00, size = 35, normalized size = 1.25 \begin {gather*} -\frac {x e^{x} \log \relax (2) + {\left (x^{2} - 1\right )} \log \relax (2) - {\left (2 \, x \log \relax (2) - 1\right )} \log \relax (x)}{x \log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.21, size = 35, normalized size = 1.25 \begin {gather*} -\frac {x^{2} \log \relax (2) + x e^{x} \log \relax (2) - 2 \, x \log \relax (2) \log \relax (x) - \log \relax (2) + \log \relax (x)}{x \log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.08, size = 30, normalized size = 1.07




method result size



norman \(\frac {1+2 x \ln \relax (x )-x^{2}-{\mathrm e}^{x} x -\frac {\ln \relax (x )}{\ln \relax (2)}}{x}\) \(30\)
risch \(-\frac {\ln \relax (x )}{x \ln \relax (2)}+\frac {2 x \ln \relax (x )-x^{2}-{\mathrm e}^{x} x +1}{x}\) \(34\)
default \(\frac {-\frac {\ln \relax (x )}{x}-x \ln \relax (2)+2 \ln \relax (2) \ln \relax (x )+\frac {\ln \relax (2)}{x}-{\mathrm e}^{x} \ln \relax (2)}{\ln \relax (2)}\) \(37\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 35, normalized size = 1.25 \begin {gather*} -\frac {x \log \relax (2) + e^{x} \log \relax (2) - 2 \, \log \relax (2) \log \relax (x) - \frac {\log \relax (2)}{x} + \frac {\log \relax (x)}{x}}{\log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 7.98, size = 26, normalized size = 0.93 \begin {gather*} 2\,\ln \relax (x)-{\mathrm {e}}^x-x+\frac {1}{x}-\frac {\ln \relax (x)}{x\,\ln \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*log(x) - exp(x) - x + 1/x - log(x)/(x*log(2))

________________________________________________________________________________________

sympy [A]  time = 0.70, size = 20, normalized size = 0.71 \begin {gather*} - x - e^{x} + 2 \log {\relax (x )} - \frac {\log {\relax (x )}}{x \log {\relax (2 )}} + \frac {1}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x - exp(x) + 2*log(x) - log(x)/(x*log(2)) + 1/x

________________________________________________________________________________________