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

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

[Out]

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

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(48\) vs. \(2(23)=46\).
time = 0.63, antiderivative size = 48, normalized size of antiderivative = 2.09, number of steps used = 8, number of rules used = 5, integrand size = 82, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {1607, 6857, 2228, 1816, 266} \begin {gather*} \frac {\log (16) \log \left (x^2 \log (4)+1\right )}{2 \log (4)}+\frac {2 e^{x+1}}{x}+\frac {e^{2 x+2}}{x}+\frac {1}{x}-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 266

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

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 1816

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 6857

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(50\) vs. \(2(23)=46\).
time = 0.19, size = 50, normalized size = 2.17 \begin {gather*} \frac {4 e^{1+x} \log (4)+\log (16)+e^{2+2 x} \log (16)-2 x \log (4) \log (x)+x \log (16) \log \left (1+x^2 \log (4)\right )}{x \log (16)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(4*E^(1 + x)*Log[4] + Log[16] + E^(2 + 2*x)*Log[16] - 2*x*Log[4]*Log[x] + x*Log[16]*Log[1 + x^2*Log[4]])/(x*Lo
g[16])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(50\) vs. \(2(23)=46\).
time = 1.71, size = 51, normalized size = 2.22

method result size
norman \(\frac {1+{\mathrm e}^{2 x +2}+2 \,{\mathrm e}^{x +1}}{x}-\ln \left (x \right )+\ln \left (2 x^{2} \ln \left (2\right )+1\right )\) \(34\)
risch \(\frac {1}{x}-\ln \left (x \right )+\ln \left (-2 x^{2} \ln \left (2\right )-1\right )+\frac {{\mathrm e}^{2 x +2}}{x}+\frac {2 \,{\mathrm e}^{x +1}}{x}\) \(38\)
derivativedivides \(\ln \left (2 \ln \left (2\right ) \left (x +1\right )^{2}-4 \ln \left (2\right ) \left (x +1\right )+2 \ln \left (2\right )+1\right )+\frac {1}{x}+\frac {{\mathrm e}^{2 x +2}}{x}-\ln \left (x \right )+\frac {2 \,{\mathrm e}^{x +1}}{x}\) \(51\)
default \(\ln \left (2 \ln \left (2\right ) \left (x +1\right )^{2}-4 \ln \left (2\right ) \left (x +1\right )+2 \ln \left (2\right )+1\right )+\frac {1}{x}+\frac {{\mathrm e}^{2 x +2}}{x}-\ln \left (x \right )+\frac {2 \,{\mathrm e}^{x +1}}{x}\) \(51\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.52, size = 37, normalized size = 1.61 \begin {gather*} \frac {e^{\left (2 \, x + 2\right )} + 2 \, e^{\left (x + 1\right )}}{x} + \frac {1}{x} + \log \left (2 \, x^{2} \log \left (2\right ) + 1\right ) - \frac {1}{2} \, \log \left (x^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.20, size = 37, normalized size = 1.61 \begin {gather*} - \log {\left (x \right )} + \log {\left (x^{2} + \frac {1}{2 \log {\left (2 \right )}} \right )} + \frac {1}{x} + \frac {2 x e^{x + 1} + x e^{2 x + 2}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 5.25, size = 33, normalized size = 1.43 \begin {gather*} \ln \left (2\,\ln \left (2\right )\,x^2+1\right )-\ln \left (x\right )+\frac {2\,{\mathrm {e}}^{x+1}+{\mathrm {e}}^{2\,x+2}+1}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________