\(\int \frac {9-2 x \log (4)+e^x (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4))+(2 x+e^x (-8 x+8 x^2 \log (4))) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx\) [2433]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 76, antiderivative size = 29 \[ \int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx=\frac {\left (\frac {1}{4}-e^x\right ) \left (-9+x+x \left (5+(\log (4)-\log (x))^2\right )\right )}{x} \]

[Out]

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

Rubi [F]

\[ \int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx=\int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx \]

[In]

Int[(9 - 2*x*Log[4] + E^x*(-36 + 36*x - 24*x^2 + 8*x*Log[4] - 4*x^2*Log[4]^2) + (2*x + E^x*(-8*x + 8*x^2*Log[4
]))*Log[x] - 4*E^x*x^2*Log[x]^2)/(4*x^2),x]

[Out]

-9/(4*x) + (9*E^x)/x - 9*ExpIntegralEi[x] + 2*x*HypergeometricPFQ[{1, 1, 1}, {2, 2, 2}, x] - 2*ExpIntegralEi[x
]*Log[4] - E^x*(6 + Log[4]^2) + ExpIntegralEi[x]*(9 + Log[16]) + Log[-x]^2 + 2*EulerGamma*Log[x] - 2*ExpIntegr
alEi[x]*Log[x] + 2*(ExpIntegralE[1, -x] + ExpIntegralEi[x])*Log[x] - (Log[4]*Log[x])/2 + 2*E^x*Log[4]*Log[x] +
 Log[x]^2/4 - Defer[Int][E^x*Log[x]^2, x]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{4} \int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{x^2} \, dx \\ & = \frac {1}{4} \int \left (\frac {9-2 x \log (4)+2 x \log (x)}{x^2}+\frac {4 e^x \left (-9+9 x \left (1+\frac {4 \log (2)}{9}\right )-6 x^2 \left (1+\frac {\log ^2(4)}{6}\right )-2 x \log (x)+2 x^2 \log (4) \log (x)-x^2 \log ^2(x)\right )}{x^2}\right ) \, dx \\ & = \frac {1}{4} \int \frac {9-2 x \log (4)+2 x \log (x)}{x^2} \, dx+\int \frac {e^x \left (-9+9 x \left (1+\frac {4 \log (2)}{9}\right )-6 x^2 \left (1+\frac {\log ^2(4)}{6}\right )-2 x \log (x)+2 x^2 \log (4) \log (x)-x^2 \log ^2(x)\right )}{x^2} \, dx \\ & = \frac {1}{4} \int \left (\frac {9-2 x \log (4)}{x^2}+\frac {2 \log (x)}{x}\right ) \, dx+\int \left (\frac {e^x \left (-9-x^2 \left (6+\log ^2(4)\right )+x (9+\log (16))\right )}{x^2}+\frac {2 e^x (-1+x \log (4)) \log (x)}{x}-e^x \log ^2(x)\right ) \, dx \\ & = \frac {1}{4} \int \frac {9-2 x \log (4)}{x^2} \, dx+\frac {1}{2} \int \frac {\log (x)}{x} \, dx+2 \int \frac {e^x (-1+x \log (4)) \log (x)}{x} \, dx+\int \frac {e^x \left (-9-x^2 \left (6+\log ^2(4)\right )+x (9+\log (16))\right )}{x^2} \, dx-\int e^x \log ^2(x) \, dx \\ & = -2 \operatorname {ExpIntegralEi}(x) \log (x)+2 e^x \log (4) \log (x)+\frac {\log ^2(x)}{4}+\frac {1}{4} \int \left (\frac {9}{x^2}-\frac {2 \log (4)}{x}\right ) \, dx-2 \int \frac {-\operatorname {ExpIntegralEi}(x)+e^x \log (4)}{x} \, dx+\int \left (-\frac {9 e^x}{x^2}-6 e^x \left (1+\frac {\log ^2(4)}{6}\right )+\frac {e^x (9+\log (16))}{x}\right ) \, dx-\int e^x \log ^2(x) \, dx \\ & = -\frac {9}{4 x}-2 \operatorname {ExpIntegralEi}(x) \log (x)-\frac {1}{2} \log (4) \log (x)+2 e^x \log (4) \log (x)+\frac {\log ^2(x)}{4}-2 \int \left (-\frac {\operatorname {ExpIntegralEi}(x)}{x}+\frac {e^x \log (4)}{x}\right ) \, dx-9 \int \frac {e^x}{x^2} \, dx-\left (6+\log ^2(4)\right ) \int e^x \, dx+(9+\log (16)) \int \frac {e^x}{x} \, dx-\int e^x \log ^2(x) \, dx \\ & = -\frac {9}{4 x}+\frac {9 e^x}{x}-e^x \left (6+\log ^2(4)\right )+\operatorname {ExpIntegralEi}(x) (9+\log (16))-2 \operatorname {ExpIntegralEi}(x) \log (x)-\frac {1}{2} \log (4) \log (x)+2 e^x \log (4) \log (x)+\frac {\log ^2(x)}{4}+2 \int \frac {\operatorname {ExpIntegralEi}(x)}{x} \, dx-9 \int \frac {e^x}{x} \, dx-(2 \log (4)) \int \frac {e^x}{x} \, dx-\int e^x \log ^2(x) \, dx \\ & = -\frac {9}{4 x}+\frac {9 e^x}{x}-9 \operatorname {ExpIntegralEi}(x)-2 \operatorname {ExpIntegralEi}(x) \log (4)-e^x \left (6+\log ^2(4)\right )+\operatorname {ExpIntegralEi}(x) (9+\log (16))-2 \operatorname {ExpIntegralEi}(x) \log (x)+2 (\operatorname {ExpIntegralE}(1,-x)+\operatorname {ExpIntegralEi}(x)) \log (x)-\frac {1}{2} \log (4) \log (x)+2 e^x \log (4) \log (x)+\frac {\log ^2(x)}{4}-2 \int \frac {\operatorname {ExpIntegralE}(1,-x)}{x} \, dx-\int e^x \log ^2(x) \, dx \\ & = -\frac {9}{4 x}+\frac {9 e^x}{x}-9 \operatorname {ExpIntegralEi}(x)+2 x \, _3F_3(1,1,1;2,2,2;x)-2 \operatorname {ExpIntegralEi}(x) \log (4)-e^x \left (6+\log ^2(4)\right )+\operatorname {ExpIntegralEi}(x) (9+\log (16))+\log ^2(-x)+2 \gamma \log (x)-2 \operatorname {ExpIntegralEi}(x) \log (x)+2 (\operatorname {ExpIntegralE}(1,-x)+\operatorname {ExpIntegralEi}(x)) \log (x)-\frac {1}{2} \log (4) \log (x)+2 e^x \log (4) \log (x)+\frac {\log ^2(x)}{4}-\int e^x \log ^2(x) \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.62 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.00 \[ \int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx=\frac {1}{4} \left (-24 e^x-\frac {9}{x}+\frac {36 e^x}{x}-4 e^x \log ^2(4)+\log ^2\left (\frac {x}{4}\right )+4 e^x \log (16) \log (x)-4 e^x \log ^2(x)\right ) \]

[In]

Integrate[(9 - 2*x*Log[4] + E^x*(-36 + 36*x - 24*x^2 + 8*x*Log[4] - 4*x^2*Log[4]^2) + (2*x + E^x*(-8*x + 8*x^2
*Log[4]))*Log[x] - 4*E^x*x^2*Log[x]^2)/(4*x^2),x]

[Out]

(-24*E^x - 9/x + (36*E^x)/x - 4*E^x*Log[4]^2 + Log[x/4]^2 + 4*E^x*Log[16]*Log[x] - 4*E^x*Log[x]^2)/4

Maple [A] (verified)

Time = 0.32 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.86

method result size
risch \(\frac {\left (-4 \,{\mathrm e}^{x}+1\right ) \ln \left (x \right )^{2}}{4}+4 \ln \left (2\right ) \ln \left (x \right ) {\mathrm e}^{x}-\frac {16 x \ln \left (2\right )^{2} {\mathrm e}^{x}+4 x \ln \left (2\right ) \ln \left (x \right )+24 \,{\mathrm e}^{x} x -36 \,{\mathrm e}^{x}+9}{4 x}\) \(54\)
norman \(\frac {-\frac {9}{4}-x \ln \left (2\right ) \ln \left (x \right )+\left (-4 \ln \left (2\right )^{2}-6\right ) x \,{\mathrm e}^{x}+\frac {x \ln \left (x \right )^{2}}{4}-x \,{\mathrm e}^{x} \ln \left (x \right )^{2}+4 x \ln \left (2\right ) {\mathrm e}^{x} \ln \left (x \right )+9 \,{\mathrm e}^{x}}{x}\) \(55\)
parallelrisch \(-\frac {4 x \,{\mathrm e}^{x} \ln \left (x \right )^{2}-16 x \ln \left (2\right ) {\mathrm e}^{x} \ln \left (x \right )+16 x \ln \left (2\right )^{2} {\mathrm e}^{x}-x \ln \left (x \right )^{2}+4 x \ln \left (2\right ) \ln \left (x \right )+24 \,{\mathrm e}^{x} x -36 \,{\mathrm e}^{x}+9}{4 x}\) \(58\)
parts \(\frac {\left (-4 \ln \left (2\right )^{2}-6\right ) x \,{\mathrm e}^{x}-x \,{\mathrm e}^{x} \ln \left (x \right )^{2}+4 x \ln \left (2\right ) {\mathrm e}^{x} \ln \left (x \right )+9 \,{\mathrm e}^{x}}{x}-\ln \left (2\right ) \ln \left (x \right )-\frac {9}{4 x}+\frac {\ln \left (x \right )^{2}}{4}\) \(58\)
default \(\frac {\left (-16 \ln \left (2\right )^{2}-24\right ) x \,{\mathrm e}^{x}-4 x \,{\mathrm e}^{x} \ln \left (x \right )^{2}+16 x \ln \left (2\right ) {\mathrm e}^{x} \ln \left (x \right )+36 \,{\mathrm e}^{x}}{4 x}-\ln \left (2\right ) \ln \left (x \right )-\frac {9}{4 x}+\frac {\ln \left (x \right )^{2}}{4}\) \(59\)

[In]

int(1/4*(-4*x^2*exp(x)*ln(x)^2+((16*x^2*ln(2)-8*x)*exp(x)+2*x)*ln(x)+(-16*x^2*ln(2)^2+16*x*ln(2)-24*x^2+36*x-3
6)*exp(x)-4*x*ln(2)+9)/x^2,x,method=_RETURNVERBOSE)

[Out]

1/4*(-4*exp(x)+1)*ln(x)^2+4*ln(2)*ln(x)*exp(x)-1/4*(16*x*ln(2)^2*exp(x)+4*x*ln(2)*ln(x)+24*exp(x)*x-36*exp(x)+
9)/x

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.86 \[ \int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx=-\frac {{\left (4 \, x e^{x} - x\right )} \log \left (x\right )^{2} + 4 \, {\left (4 \, x \log \left (2\right )^{2} + 6 \, x - 9\right )} e^{x} - 4 \, {\left (4 \, x e^{x} \log \left (2\right ) - x \log \left (2\right )\right )} \log \left (x\right ) + 9}{4 \, x} \]

[In]

integrate(1/4*(-4*x^2*exp(x)*log(x)^2+((16*x^2*log(2)-8*x)*exp(x)+2*x)*log(x)+(-16*x^2*log(2)^2+16*x*log(2)-24
*x^2+36*x-36)*exp(x)-4*x*log(2)+9)/x^2,x, algorithm="fricas")

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (24) = 48\).

Time = 0.16 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.83 \[ \int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx=\frac {\log {\left (x \right )}^{2}}{4} - \log {\left (2 \right )} \log {\left (x \right )} + \frac {\left (- x \log {\left (x \right )}^{2} + 4 x \log {\left (2 \right )} \log {\left (x \right )} - 6 x - 4 x \log {\left (2 \right )}^{2} + 9\right ) e^{x}}{x} - \frac {9}{4 x} \]

[In]

integrate(1/4*(-4*x**2*exp(x)*ln(x)**2+((16*x**2*ln(2)-8*x)*exp(x)+2*x)*ln(x)+(-16*x**2*ln(2)**2+16*x*ln(2)-24
*x**2+36*x-36)*exp(x)-4*x*ln(2)+9)/x**2,x)

[Out]

log(x)**2/4 - log(2)*log(x) + (-x*log(x)**2 + 4*x*log(2)*log(x) - 6*x - 4*x*log(2)**2 + 9)*exp(x)/x - 9/(4*x)

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.24 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.97 \[ \int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx=-4 \, e^{x} \log \left (2\right )^{2} + 4 \, e^{x} \log \left (2\right ) \log \left (x\right ) - e^{x} \log \left (x\right )^{2} - \log \left (2\right ) \log \left (x\right ) + \frac {1}{4} \, \log \left (x\right )^{2} - \frac {9}{4 \, x} + 9 \, {\rm Ei}\left (x\right ) - 6 \, e^{x} - 9 \, \Gamma \left (-1, -x\right ) \]

[In]

integrate(1/4*(-4*x^2*exp(x)*log(x)^2+((16*x^2*log(2)-8*x)*exp(x)+2*x)*log(x)+(-16*x^2*log(2)^2+16*x*log(2)-24
*x^2+36*x-36)*exp(x)-4*x*log(2)+9)/x^2,x, algorithm="maxima")

[Out]

-4*e^x*log(2)^2 + 4*e^x*log(2)*log(x) - e^x*log(x)^2 - log(2)*log(x) + 1/4*log(x)^2 - 9/4/x + 9*Ei(x) - 6*e^x
- 9*gamma(-1, -x)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.97 \[ \int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx=-\frac {16 \, x e^{x} \log \left (2\right )^{2} - 16 \, x e^{x} \log \left (2\right ) \log \left (x\right ) + 4 \, x e^{x} \log \left (x\right )^{2} + 4 \, x \log \left (2\right ) \log \left (x\right ) - x \log \left (x\right )^{2} + 24 \, x e^{x} - 36 \, e^{x} + 9}{4 \, x} \]

[In]

integrate(1/4*(-4*x^2*exp(x)*log(x)^2+((16*x^2*log(2)-8*x)*exp(x)+2*x)*log(x)+(-16*x^2*log(2)^2+16*x*log(2)-24
*x^2+36*x-36)*exp(x)-4*x*log(2)+9)/x^2,x, algorithm="giac")

[Out]

-1/4*(16*x*e^x*log(2)^2 - 16*x*e^x*log(2)*log(x) + 4*x*e^x*log(x)^2 + 4*x*log(2)*log(x) - x*log(x)^2 + 24*x*e^
x - 36*e^x + 9)/x

Mupad [B] (verification not implemented)

Time = 9.32 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.76 \[ \int \frac {9-2 x \log (4)+e^x \left (-36+36 x-24 x^2+8 x \log (4)-4 x^2 \log ^2(4)\right )+\left (2 x+e^x \left (-8 x+8 x^2 \log (4)\right )\right ) \log (x)-4 e^x x^2 \log ^2(x)}{4 x^2} \, dx=\frac {{\ln \left (x\right )}^2}{4}-4\,{\mathrm {e}}^x\,{\ln \left (2\right )}^2-6\,{\mathrm {e}}^x-{\mathrm {e}}^x\,{\ln \left (x\right )}^2-\ln \left (2\right )\,\ln \left (x\right )+\frac {9\,{\mathrm {e}}^x-\frac {9}{4}}{x}+4\,{\mathrm {e}}^x\,\ln \left (2\right )\,\ln \left (x\right ) \]

[In]

int(-(x*log(2) - (log(x)*(2*x - exp(x)*(8*x - 16*x^2*log(2))))/4 + (exp(x)*(16*x^2*log(2)^2 - 36*x - 16*x*log(
2) + 24*x^2 + 36))/4 + x^2*exp(x)*log(x)^2 - 9/4)/x^2,x)

[Out]

log(x)^2/4 - 4*exp(x)*log(2)^2 - 6*exp(x) - exp(x)*log(x)^2 - log(2)*log(x) + (9*exp(x) - 9/4)/x + 4*exp(x)*lo
g(2)*log(x)