\(\int \frac {e^{4 x} (-256+64 x)+(16-5 x) \log (2)+(-256+64 x) \log ^2(2)+e^{2 x} (-16+37 x-8 x^2+(512-128 x) \log (2))+(e^{4 x} (-128+32 x)+(4-x) \log (2)+(-128+32 x) \log ^2(2)+e^{2 x} (-4+9 x-2 x^2+(256-64 x) \log (2))) \log (-\frac {4}{-4+x})+(e^{4 x} (-16+4 x)+e^{2 x} (32-8 x) \log (2)+(-16+4 x) \log ^2(2)) \log ^2(-\frac {4}{-4+x})}{e^{4 x} (-256-192 x+64 x^2)+(16 x-4 x^2) \log (2)+(-256-192 x+64 x^2) \log ^2(2)+e^{2 x} (-16 x+4 x^2+(512+384 x-128 x^2) \log (2))+(e^{4 x} (-128-96 x+32 x^2)+(4 x-x^2) \log (2)+(-128-96 x+32 x^2) \log ^2(2)+e^{2 x} (-4 x+x^2+(256+192 x-64 x^2) \log (2))) \log (-\frac {4}{-4+x})+(e^{4 x} (-16-12 x+4 x^2)+e^{2 x} (32+24 x-8 x^2) \log (2)+(-16-12 x+4 x^2) \log ^2(2)) \log ^2(-\frac {4}{-4+x})} \, dx\) [1911]

Optimal result
Mathematica [B] (verified)
Rubi [F]
Maple [C] (warning: unable to verify)
Fricas [B] (verification not implemented)
Sympy [F(-2)]
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 378, antiderivative size = 37 \[ \int \frac {e^{4 x} (-256+64 x)+(16-5 x) \log (2)+(-256+64 x) \log ^2(2)+e^{2 x} \left (-16+37 x-8 x^2+(512-128 x) \log (2)\right )+\left (e^{4 x} (-128+32 x)+(4-x) \log (2)+(-128+32 x) \log ^2(2)+e^{2 x} \left (-4+9 x-2 x^2+(256-64 x) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} (-16+4 x)+e^{2 x} (32-8 x) \log (2)+(-16+4 x) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )}{e^{4 x} \left (-256-192 x+64 x^2\right )+\left (16 x-4 x^2\right ) \log (2)+\left (-256-192 x+64 x^2\right ) \log ^2(2)+e^{2 x} \left (-16 x+4 x^2+\left (512+384 x-128 x^2\right ) \log (2)\right )+\left (e^{4 x} \left (-128-96 x+32 x^2\right )+\left (4 x-x^2\right ) \log (2)+\left (-128-96 x+32 x^2\right ) \log ^2(2)+e^{2 x} \left (-4 x+x^2+\left (256+192 x-64 x^2\right ) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} \left (-16-12 x+4 x^2\right )+e^{2 x} \left (32+24 x-8 x^2\right ) \log (2)+\left (-16-12 x+4 x^2\right ) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )} \, dx=\log \left (1+x+\frac {x}{4 \left (e^{2 x}-\log (2)\right ) \left (4+\log \left (1+\frac {x}{4-x}\right )\right )}\right ) \] Output:

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(118\) vs. \(2(37)=74\).

Time = 0.25 (sec) , antiderivative size = 118, normalized size of antiderivative = 3.19 \[ \int \frac {e^{4 x} (-256+64 x)+(16-5 x) \log (2)+(-256+64 x) \log ^2(2)+e^{2 x} \left (-16+37 x-8 x^2+(512-128 x) \log (2)\right )+\left (e^{4 x} (-128+32 x)+(4-x) \log (2)+(-128+32 x) \log ^2(2)+e^{2 x} \left (-4+9 x-2 x^2+(256-64 x) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} (-16+4 x)+e^{2 x} (32-8 x) \log (2)+(-16+4 x) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )}{e^{4 x} \left (-256-192 x+64 x^2\right )+\left (16 x-4 x^2\right ) \log (2)+\left (-256-192 x+64 x^2\right ) \log ^2(2)+e^{2 x} \left (-16 x+4 x^2+\left (512+384 x-128 x^2\right ) \log (2)\right )+\left (e^{4 x} \left (-128-96 x+32 x^2\right )+\left (4 x-x^2\right ) \log (2)+\left (-128-96 x+32 x^2\right ) \log ^2(2)+e^{2 x} \left (-4 x+x^2+\left (256+192 x-64 x^2\right ) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} \left (-16-12 x+4 x^2\right )+e^{2 x} \left (32+24 x-8 x^2\right ) \log (2)+\left (-16-12 x+4 x^2\right ) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )} \, dx=\log (1+x)-\log \left ((1+x) \left (e^{2 x}-\log (2)\right )\right )-\log \left (4+\log \left (-\frac {4}{-4+x}\right )\right )+\log \left (16 e^{2 x}+x+16 e^{2 x} x-16 \log (2)-16 x \log (2)+4 e^{2 x} \log \left (-\frac {4}{-4+x}\right )+4 e^{2 x} x \log \left (-\frac {4}{-4+x}\right )-4 \log (2) \log \left (-\frac {4}{-4+x}\right )-4 x \log (2) \log \left (-\frac {4}{-4+x}\right )\right ) \] Input:

Integrate[(E^(4*x)*(-256 + 64*x) + (16 - 5*x)*Log[2] + (-256 + 64*x)*Log[2 
]^2 + E^(2*x)*(-16 + 37*x - 8*x^2 + (512 - 128*x)*Log[2]) + (E^(4*x)*(-128 
 + 32*x) + (4 - x)*Log[2] + (-128 + 32*x)*Log[2]^2 + E^(2*x)*(-4 + 9*x - 2 
*x^2 + (256 - 64*x)*Log[2]))*Log[-4/(-4 + x)] + (E^(4*x)*(-16 + 4*x) + E^( 
2*x)*(32 - 8*x)*Log[2] + (-16 + 4*x)*Log[2]^2)*Log[-4/(-4 + x)]^2)/(E^(4*x 
)*(-256 - 192*x + 64*x^2) + (16*x - 4*x^2)*Log[2] + (-256 - 192*x + 64*x^2 
)*Log[2]^2 + E^(2*x)*(-16*x + 4*x^2 + (512 + 384*x - 128*x^2)*Log[2]) + (E 
^(4*x)*(-128 - 96*x + 32*x^2) + (4*x - x^2)*Log[2] + (-128 - 96*x + 32*x^2 
)*Log[2]^2 + E^(2*x)*(-4*x + x^2 + (256 + 192*x - 64*x^2)*Log[2]))*Log[-4/ 
(-4 + x)] + (E^(4*x)*(-16 - 12*x + 4*x^2) + E^(2*x)*(32 + 24*x - 8*x^2)*Lo 
g[2] + (-16 - 12*x + 4*x^2)*Log[2]^2)*Log[-4/(-4 + x)]^2),x]
 

Output:

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

Rubi [F]

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (e^{2 x} \left (-2 x^2+9 x+(256-64 x) \log (2)-4\right )+e^{4 x} (32 x-128)+(32 x-128) \log ^2(2)+(4-x) \log (2)\right ) \log \left (-\frac {4}{x-4}\right )+e^{2 x} \left (-8 x^2+37 x+(512-128 x) \log (2)-16\right )+e^{4 x} (64 x-256)+\left (e^{4 x} (4 x-16)+(4 x-16) \log ^2(2)+e^{2 x} (32-8 x) \log (2)\right ) \log ^2\left (-\frac {4}{x-4}\right )+(64 x-256) \log ^2(2)+(16-5 x) \log (2)}{e^{4 x} \left (64 x^2-192 x-256\right )+\left (e^{4 x} \left (4 x^2-12 x-16\right )+\left (4 x^2-12 x-16\right ) \log ^2(2)+e^{2 x} \left (-8 x^2+24 x+32\right ) \log (2)\right ) \log ^2\left (-\frac {4}{x-4}\right )+\left (e^{4 x} \left (32 x^2-96 x-128\right )+\left (32 x^2-96 x-128\right ) \log ^2(2)+\left (4 x-x^2\right ) \log (2)+e^{2 x} \left (x^2+\left (-64 x^2+192 x+256\right ) \log (2)-4 x\right )\right ) \log \left (-\frac {4}{x-4}\right )+\left (64 x^2-192 x-256\right ) \log ^2(2)+e^{2 x} \left (4 x^2+\left (-128 x^2+384 x+512\right ) \log (2)-16 x\right )+\left (16 x-4 x^2\right ) \log (2)} \, dx\)

\(\Big \downarrow \) 7239

\(\displaystyle \int \frac {-e^{2 x} \left (-8 x^2+x (37-128 \log (2))-16+512 \log (2)\right )-64 e^{4 x} (x-4)-4 (x-4) \left (e^{2 x}-\log (2)\right )^2 \log ^2\left (-\frac {4}{x-4}\right )-(x-4) \left (32 e^{4 x}+e^{2 x} (-2 x+1-64 \log (2))+\log (2) (32 \log (2)-1)\right ) \log \left (-\frac {4}{x-4}\right )-\log (2) (x (64 \log (2)-5)+16-256 \log (2))}{(4-x) \left (e^{2 x}-\log (2)\right ) \left (\log \left (-\frac {4}{x-4}\right )+4\right ) \left (16 e^{2 x} (x+1)+x (1-16 \log (2))+4 (x+1) \left (e^{2 x}-\log (2)\right ) \log \left (-\frac {4}{x-4}\right )-16 \log (2)\right )}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {-8 x^3 \log (2) \log ^2\left (-\frac {4}{x-4}\right )+2 x^3 (1-32 \log (2)) \log \left (-\frac {4}{x-4}\right )+8 x^3 (1-16 \log (2))+16 x^2 \log (2) \log ^2\left (-\frac {4}{x-4}\right )-6 x^2 \left (1-\frac {64 \log (2)}{3}\right ) \log \left (-\frac {4}{x-4}\right )-25 x^2 \left (1-\frac {256 \log (2)}{25}\right )+56 x \log (2) \log ^2\left (-\frac {4}{x-4}\right )+32 \log (2) \log ^2\left (-\frac {4}{x-4}\right )-9 x \left (1-\frac {448 \log (2)}{9}\right ) \log \left (-\frac {4}{x-4}\right )-37 x \left (1-\frac {896 \log (2)}{37}\right )+4 (1+64 \log (2)) \log \left (-\frac {4}{x-4}\right )+16 (1+32 \log (2))}{(4-x) (x+1) \left (\log \left (-\frac {4}{x-4}\right )+4\right ) \left (16 e^{2 x} x+16 e^{2 x}+4 e^{2 x} x \log \left (-\frac {4}{x-4}\right )-4 x \log (2) \log \left (-\frac {4}{x-4}\right )+x (1-16 \log (2))+4 e^{2 x} \log \left (-\frac {4}{x-4}\right )-4 \log (2) \log \left (-\frac {4}{x-4}\right )-16 \log (2)\right )}+\frac {1}{x+1}-\frac {\log (4)}{e^{2 x}-\log (2)}\right )dx\)

\(\Big \downarrow \) 7299

\(\displaystyle \int \left (\frac {-8 x^3 \log (2) \log ^2\left (-\frac {4}{x-4}\right )+2 x^3 (1-32 \log (2)) \log \left (-\frac {4}{x-4}\right )+8 x^3 (1-16 \log (2))+16 x^2 \log (2) \log ^2\left (-\frac {4}{x-4}\right )-6 x^2 \left (1-\frac {64 \log (2)}{3}\right ) \log \left (-\frac {4}{x-4}\right )-25 x^2 \left (1-\frac {256 \log (2)}{25}\right )+56 x \log (2) \log ^2\left (-\frac {4}{x-4}\right )+32 \log (2) \log ^2\left (-\frac {4}{x-4}\right )-9 x \left (1-\frac {448 \log (2)}{9}\right ) \log \left (-\frac {4}{x-4}\right )-37 x \left (1-\frac {896 \log (2)}{37}\right )+4 (1+64 \log (2)) \log \left (-\frac {4}{x-4}\right )+16 (1+32 \log (2))}{(4-x) (x+1) \left (\log \left (-\frac {4}{x-4}\right )+4\right ) \left (16 e^{2 x} x+16 e^{2 x}+4 e^{2 x} x \log \left (-\frac {4}{x-4}\right )-4 x \log (2) \log \left (-\frac {4}{x-4}\right )+x (1-16 \log (2))+4 e^{2 x} \log \left (-\frac {4}{x-4}\right )-4 \log (2) \log \left (-\frac {4}{x-4}\right )-16 \log (2)\right )}+\frac {1}{x+1}-\frac {\log (4)}{e^{2 x}-\log (2)}\right )dx\)

Input:

Int[(E^(4*x)*(-256 + 64*x) + (16 - 5*x)*Log[2] + (-256 + 64*x)*Log[2]^2 + 
E^(2*x)*(-16 + 37*x - 8*x^2 + (512 - 128*x)*Log[2]) + (E^(4*x)*(-128 + 32* 
x) + (4 - x)*Log[2] + (-128 + 32*x)*Log[2]^2 + E^(2*x)*(-4 + 9*x - 2*x^2 + 
 (256 - 64*x)*Log[2]))*Log[-4/(-4 + x)] + (E^(4*x)*(-16 + 4*x) + E^(2*x)*( 
32 - 8*x)*Log[2] + (-16 + 4*x)*Log[2]^2)*Log[-4/(-4 + x)]^2)/(E^(4*x)*(-25 
6 - 192*x + 64*x^2) + (16*x - 4*x^2)*Log[2] + (-256 - 192*x + 64*x^2)*Log[ 
2]^2 + E^(2*x)*(-16*x + 4*x^2 + (512 + 384*x - 128*x^2)*Log[2]) + (E^(4*x) 
*(-128 - 96*x + 32*x^2) + (4*x - x^2)*Log[2] + (-128 - 96*x + 32*x^2)*Log[ 
2]^2 + E^(2*x)*(-4*x + x^2 + (256 + 192*x - 64*x^2)*Log[2]))*Log[-4/(-4 + 
x)] + (E^(4*x)*(-16 - 12*x + 4*x^2) + E^(2*x)*(32 + 24*x - 8*x^2)*Log[2] + 
 (-16 - 12*x + 4*x^2)*Log[2]^2)*Log[-4/(-4 + x)]^2),x]
 

Output:

$Aborted
 
Maple [C] (warning: unable to verify)

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

Time = 0.26 (sec) , antiderivative size = 318, normalized size of antiderivative = 8.59

\[\ln \left (1+x \right )+\ln \left (\ln \left (x -4\right )-\frac {i \left (16 i x \,{\mathrm e}^{2 x}+i x -16 i \ln \left (2\right )-8 i \ln \left (2\right )^{2}-4 \pi \,{\mathrm e}^{2 x}+16 i {\mathrm e}^{2 x}+4 \pi \ln \left (2\right )+4 \pi \operatorname {csgn}\left (\frac {i}{x -4}\right )^{2} {\mathrm e}^{2 x}-4 \ln \left (2\right ) \pi \operatorname {csgn}\left (\frac {i}{x -4}\right )^{2}+4 \pi \ln \left (2\right ) x -4 \pi x \,{\mathrm e}^{2 x}+8 i \ln \left (2\right ) {\mathrm e}^{2 x}+8 i \ln \left (2\right ) x \,{\mathrm e}^{2 x}-16 i \ln \left (2\right ) x +4 \ln \left (2\right ) \pi \operatorname {csgn}\left (\frac {i}{x -4}\right )^{3}-4 \pi \operatorname {csgn}\left (\frac {i}{x -4}\right )^{3} {\mathrm e}^{2 x}-8 i \ln \left (2\right )^{2} x +4 \pi \ln \left (2\right ) x \operatorname {csgn}\left (\frac {i}{x -4}\right )^{3}-4 \pi x \operatorname {csgn}\left (\frac {i}{x -4}\right )^{3} {\mathrm e}^{2 x}-4 \pi \ln \left (2\right ) x \operatorname {csgn}\left (\frac {i}{x -4}\right )^{2}+4 \pi x \operatorname {csgn}\left (\frac {i}{x -4}\right )^{2} {\mathrm e}^{2 x}\right )}{4 \left (-x \,{\mathrm e}^{2 x}+x \ln \left (2\right )-{\mathrm e}^{2 x}+\ln \left (2\right )\right )}\right )-\ln \left (\ln \left (x -4\right )-\frac {i \left (-2 \pi \operatorname {csgn}\left (\frac {i}{x -4}\right )^{2}+2 \pi \operatorname {csgn}\left (\frac {i}{x -4}\right )^{3}-4 i \ln \left (2\right )+2 \pi -8 i\right )}{2}\right )\]

Input:

int((((4*x-16)*exp(x)^4+(-8*x+32)*ln(2)*exp(x)^2+(4*x-16)*ln(2)^2)*ln(-4/( 
x-4))^2+((32*x-128)*exp(x)^4+((-64*x+256)*ln(2)-2*x^2+9*x-4)*exp(x)^2+(32* 
x-128)*ln(2)^2+(-x+4)*ln(2))*ln(-4/(x-4))+(64*x-256)*exp(x)^4+((-128*x+512 
)*ln(2)-8*x^2+37*x-16)*exp(x)^2+(64*x-256)*ln(2)^2+(-5*x+16)*ln(2))/(((4*x 
^2-12*x-16)*exp(x)^4+(-8*x^2+24*x+32)*ln(2)*exp(x)^2+(4*x^2-12*x-16)*ln(2) 
^2)*ln(-4/(x-4))^2+((32*x^2-96*x-128)*exp(x)^4+((-64*x^2+192*x+256)*ln(2)+ 
x^2-4*x)*exp(x)^2+(32*x^2-96*x-128)*ln(2)^2+(-x^2+4*x)*ln(2))*ln(-4/(x-4)) 
+(64*x^2-192*x-256)*exp(x)^4+((-128*x^2+384*x+512)*ln(2)+4*x^2-16*x)*exp(x 
)^2+(64*x^2-192*x-256)*ln(2)^2+(-4*x^2+16*x)*ln(2)),x)
 

Output:

ln(1+x)+ln(ln(x-4)-1/4*I*(16*I*x*exp(2*x)+I*x-16*I*ln(2)-8*I*ln(2)^2-4*Pi* 
exp(2*x)+16*I*exp(2*x)+4*Pi*ln(2)+4*Pi*csgn(I/(x-4))^2*exp(2*x)-4*ln(2)*Pi 
*csgn(I/(x-4))^2+4*Pi*ln(2)*x-4*Pi*x*exp(2*x)+8*I*ln(2)*exp(2*x)+8*I*ln(2) 
*x*exp(2*x)-16*I*ln(2)*x+4*ln(2)*Pi*csgn(I/(x-4))^3-4*Pi*csgn(I/(x-4))^3*e 
xp(2*x)-8*I*ln(2)^2*x+4*Pi*ln(2)*x*csgn(I/(x-4))^3-4*Pi*x*csgn(I/(x-4))^3* 
exp(2*x)-4*Pi*ln(2)*x*csgn(I/(x-4))^2+4*Pi*x*csgn(I/(x-4))^2*exp(2*x))/(-x 
*exp(2*x)+x*ln(2)-exp(2*x)+ln(2)))-ln(ln(x-4)-1/2*I*(-2*Pi*csgn(I/(x-4))^2 
+2*Pi*csgn(I/(x-4))^3-4*I*ln(2)+2*Pi-8*I))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 82 vs. \(2 (33) = 66\).

Time = 0.10 (sec) , antiderivative size = 82, normalized size of antiderivative = 2.22 \[ \int \frac {e^{4 x} (-256+64 x)+(16-5 x) \log (2)+(-256+64 x) \log ^2(2)+e^{2 x} \left (-16+37 x-8 x^2+(512-128 x) \log (2)\right )+\left (e^{4 x} (-128+32 x)+(4-x) \log (2)+(-128+32 x) \log ^2(2)+e^{2 x} \left (-4+9 x-2 x^2+(256-64 x) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} (-16+4 x)+e^{2 x} (32-8 x) \log (2)+(-16+4 x) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )}{e^{4 x} \left (-256-192 x+64 x^2\right )+\left (16 x-4 x^2\right ) \log (2)+\left (-256-192 x+64 x^2\right ) \log ^2(2)+e^{2 x} \left (-16 x+4 x^2+\left (512+384 x-128 x^2\right ) \log (2)\right )+\left (e^{4 x} \left (-128-96 x+32 x^2\right )+\left (4 x-x^2\right ) \log (2)+\left (-128-96 x+32 x^2\right ) \log ^2(2)+e^{2 x} \left (-4 x+x^2+\left (256+192 x-64 x^2\right ) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} \left (-16-12 x+4 x^2\right )+e^{2 x} \left (32+24 x-8 x^2\right ) \log (2)+\left (-16-12 x+4 x^2\right ) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )} \, dx=\log \left (x + 1\right ) + \log \left (\frac {16 \, {\left (x + 1\right )} e^{\left (2 \, x\right )} - 16 \, {\left (x + 1\right )} \log \left (2\right ) + 4 \, {\left ({\left (x + 1\right )} e^{\left (2 \, x\right )} - {\left (x + 1\right )} \log \left (2\right )\right )} \log \left (-\frac {4}{x - 4}\right ) + x}{{\left (x + 1\right )} e^{\left (2 \, x\right )} - {\left (x + 1\right )} \log \left (2\right )}\right ) - \log \left (\log \left (-\frac {4}{x - 4}\right ) + 4\right ) \] Input:

integrate((((4*x-16)*exp(x)^4+(-8*x+32)*log(2)*exp(x)^2+(4*x-16)*log(2)^2) 
*log(-4/(-4+x))^2+((32*x-128)*exp(x)^4+((-64*x+256)*log(2)-2*x^2+9*x-4)*ex 
p(x)^2+(32*x-128)*log(2)^2+(-x+4)*log(2))*log(-4/(-4+x))+(64*x-256)*exp(x) 
^4+((-128*x+512)*log(2)-8*x^2+37*x-16)*exp(x)^2+(64*x-256)*log(2)^2+(-5*x+ 
16)*log(2))/(((4*x^2-12*x-16)*exp(x)^4+(-8*x^2+24*x+32)*log(2)*exp(x)^2+(4 
*x^2-12*x-16)*log(2)^2)*log(-4/(-4+x))^2+((32*x^2-96*x-128)*exp(x)^4+((-64 
*x^2+192*x+256)*log(2)+x^2-4*x)*exp(x)^2+(32*x^2-96*x-128)*log(2)^2+(-x^2+ 
4*x)*log(2))*log(-4/(-4+x))+(64*x^2-192*x-256)*exp(x)^4+((-128*x^2+384*x+5 
12)*log(2)+4*x^2-16*x)*exp(x)^2+(64*x^2-192*x-256)*log(2)^2+(-4*x^2+16*x)* 
log(2)),x, algorithm="fricas")
 

Output:

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

Sympy [F(-2)]

Exception generated. \[ \int \frac {e^{4 x} (-256+64 x)+(16-5 x) \log (2)+(-256+64 x) \log ^2(2)+e^{2 x} \left (-16+37 x-8 x^2+(512-128 x) \log (2)\right )+\left (e^{4 x} (-128+32 x)+(4-x) \log (2)+(-128+32 x) \log ^2(2)+e^{2 x} \left (-4+9 x-2 x^2+(256-64 x) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} (-16+4 x)+e^{2 x} (32-8 x) \log (2)+(-16+4 x) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )}{e^{4 x} \left (-256-192 x+64 x^2\right )+\left (16 x-4 x^2\right ) \log (2)+\left (-256-192 x+64 x^2\right ) \log ^2(2)+e^{2 x} \left (-16 x+4 x^2+\left (512+384 x-128 x^2\right ) \log (2)\right )+\left (e^{4 x} \left (-128-96 x+32 x^2\right )+\left (4 x-x^2\right ) \log (2)+\left (-128-96 x+32 x^2\right ) \log ^2(2)+e^{2 x} \left (-4 x+x^2+\left (256+192 x-64 x^2\right ) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} \left (-16-12 x+4 x^2\right )+e^{2 x} \left (32+24 x-8 x^2\right ) \log (2)+\left (-16-12 x+4 x^2\right ) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )} \, dx=\text {Exception raised: PolynomialError} \] Input:

integrate((((4*x-16)*exp(x)**4+(-8*x+32)*ln(2)*exp(x)**2+(4*x-16)*ln(2)**2 
)*ln(-4/(-4+x))**2+((32*x-128)*exp(x)**4+((-64*x+256)*ln(2)-2*x**2+9*x-4)* 
exp(x)**2+(32*x-128)*ln(2)**2+(-x+4)*ln(2))*ln(-4/(-4+x))+(64*x-256)*exp(x 
)**4+((-128*x+512)*ln(2)-8*x**2+37*x-16)*exp(x)**2+(64*x-256)*ln(2)**2+(-5 
*x+16)*ln(2))/(((4*x**2-12*x-16)*exp(x)**4+(-8*x**2+24*x+32)*ln(2)*exp(x)* 
*2+(4*x**2-12*x-16)*ln(2)**2)*ln(-4/(-4+x))**2+((32*x**2-96*x-128)*exp(x)* 
*4+((-64*x**2+192*x+256)*ln(2)+x**2-4*x)*exp(x)**2+(32*x**2-96*x-128)*ln(2 
)**2+(-x**2+4*x)*ln(2))*ln(-4/(-4+x))+(64*x**2-192*x-256)*exp(x)**4+((-128 
*x**2+384*x+512)*ln(2)+4*x**2-16*x)*exp(x)**2+(64*x**2-192*x-256)*ln(2)**2 
+(-4*x**2+16*x)*ln(2)),x)
 

Output:

Exception raised: PolynomialError >> 1/(4*_t0**2*x**3 - 8*_t0**2*x**2 - 28 
*_t0**2*x - 16*_t0**2 + 32*_t0*x**3 - 64*_t0*x**2 - 224*_t0*x - 128*_t0 + 
64*x**3 - 128*x**2 - 448*x - 256) contains an element of the set of genera 
tors.
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 110 vs. \(2 (33) = 66\).

Time = 0.49 (sec) , antiderivative size = 110, normalized size of antiderivative = 2.97 \[ \int \frac {e^{4 x} (-256+64 x)+(16-5 x) \log (2)+(-256+64 x) \log ^2(2)+e^{2 x} \left (-16+37 x-8 x^2+(512-128 x) \log (2)\right )+\left (e^{4 x} (-128+32 x)+(4-x) \log (2)+(-128+32 x) \log ^2(2)+e^{2 x} \left (-4+9 x-2 x^2+(256-64 x) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} (-16+4 x)+e^{2 x} (32-8 x) \log (2)+(-16+4 x) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )}{e^{4 x} \left (-256-192 x+64 x^2\right )+\left (16 x-4 x^2\right ) \log (2)+\left (-256-192 x+64 x^2\right ) \log ^2(2)+e^{2 x} \left (-16 x+4 x^2+\left (512+384 x-128 x^2\right ) \log (2)\right )+\left (e^{4 x} \left (-128-96 x+32 x^2\right )+\left (4 x-x^2\right ) \log (2)+\left (-128-96 x+32 x^2\right ) \log ^2(2)+e^{2 x} \left (-4 x+x^2+\left (256+192 x-64 x^2\right ) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} \left (-16-12 x+4 x^2\right )+e^{2 x} \left (32+24 x-8 x^2\right ) \log (2)+\left (-16-12 x+4 x^2\right ) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )} \, dx=\log \left (x + 1\right ) + \log \left (\frac {{\left (8 \, \log \left (2\right )^{2} + 16 \, \log \left (2\right ) - 1\right )} x - 8 \, {\left (x {\left (\log \left (2\right ) + 2\right )} + \log \left (2\right ) + 2\right )} e^{\left (2 \, x\right )} + 8 \, \log \left (2\right )^{2} + 4 \, {\left ({\left (x + 1\right )} e^{\left (2 \, x\right )} - x \log \left (2\right ) - \log \left (2\right )\right )} \log \left (-x + 4\right ) + 16 \, \log \left (2\right )}{4 \, {\left ({\left (x + 1\right )} e^{\left (2 \, x\right )} - x \log \left (2\right ) - \log \left (2\right )\right )}}\right ) - \log \left (-2 \, \log \left (2\right ) + \log \left (-x + 4\right ) - 4\right ) \] Input:

integrate((((4*x-16)*exp(x)^4+(-8*x+32)*log(2)*exp(x)^2+(4*x-16)*log(2)^2) 
*log(-4/(-4+x))^2+((32*x-128)*exp(x)^4+((-64*x+256)*log(2)-2*x^2+9*x-4)*ex 
p(x)^2+(32*x-128)*log(2)^2+(-x+4)*log(2))*log(-4/(-4+x))+(64*x-256)*exp(x) 
^4+((-128*x+512)*log(2)-8*x^2+37*x-16)*exp(x)^2+(64*x-256)*log(2)^2+(-5*x+ 
16)*log(2))/(((4*x^2-12*x-16)*exp(x)^4+(-8*x^2+24*x+32)*log(2)*exp(x)^2+(4 
*x^2-12*x-16)*log(2)^2)*log(-4/(-4+x))^2+((32*x^2-96*x-128)*exp(x)^4+((-64 
*x^2+192*x+256)*log(2)+x^2-4*x)*exp(x)^2+(32*x^2-96*x-128)*log(2)^2+(-x^2+ 
4*x)*log(2))*log(-4/(-4+x))+(64*x^2-192*x-256)*exp(x)^4+((-128*x^2+384*x+5 
12)*log(2)+4*x^2-16*x)*exp(x)^2+(64*x^2-192*x-256)*log(2)^2+(-4*x^2+16*x)* 
log(2)),x, algorithm="maxima")
 

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1010 vs. \(2 (33) = 66\).

Time = 0.98 (sec) , antiderivative size = 1010, normalized size of antiderivative = 27.30 \[ \int \frac {e^{4 x} (-256+64 x)+(16-5 x) \log (2)+(-256+64 x) \log ^2(2)+e^{2 x} \left (-16+37 x-8 x^2+(512-128 x) \log (2)\right )+\left (e^{4 x} (-128+32 x)+(4-x) \log (2)+(-128+32 x) \log ^2(2)+e^{2 x} \left (-4+9 x-2 x^2+(256-64 x) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} (-16+4 x)+e^{2 x} (32-8 x) \log (2)+(-16+4 x) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )}{e^{4 x} \left (-256-192 x+64 x^2\right )+\left (16 x-4 x^2\right ) \log (2)+\left (-256-192 x+64 x^2\right ) \log ^2(2)+e^{2 x} \left (-16 x+4 x^2+\left (512+384 x-128 x^2\right ) \log (2)\right )+\left (e^{4 x} \left (-128-96 x+32 x^2\right )+\left (4 x-x^2\right ) \log (2)+\left (-128-96 x+32 x^2\right ) \log ^2(2)+e^{2 x} \left (-4 x+x^2+\left (256+192 x-64 x^2\right ) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} \left (-16-12 x+4 x^2\right )+e^{2 x} \left (32+24 x-8 x^2\right ) \log (2)+\left (-16-12 x+4 x^2\right ) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )} \, dx=\text {Too large to display} \] Input:

integrate((((4*x-16)*exp(x)^4+(-8*x+32)*log(2)*exp(x)^2+(4*x-16)*log(2)^2) 
*log(-4/(-4+x))^2+((32*x-128)*exp(x)^4+((-64*x+256)*log(2)-2*x^2+9*x-4)*ex 
p(x)^2+(32*x-128)*log(2)^2+(-x+4)*log(2))*log(-4/(-4+x))+(64*x-256)*exp(x) 
^4+((-128*x+512)*log(2)-8*x^2+37*x-16)*exp(x)^2+(64*x-256)*log(2)^2+(-5*x+ 
16)*log(2))/(((4*x^2-12*x-16)*exp(x)^4+(-8*x^2+24*x+32)*log(2)*exp(x)^2+(4 
*x^2-12*x-16)*log(2)^2)*log(-4/(-4+x))^2+((32*x^2-96*x-128)*exp(x)^4+((-64 
*x^2+192*x+256)*log(2)+x^2-4*x)*exp(x)^2+(32*x^2-96*x-128)*log(2)^2+(-x^2+ 
4*x)*log(2))*log(-4/(-4+x))+(64*x^2-192*x-256)*exp(x)^4+((-128*x^2+384*x+5 
12)*log(2)+4*x^2-16*x)*exp(x)^2+(64*x^2-192*x-256)*log(2)^2+(-4*x^2+16*x)* 
log(2)),x, algorithm="giac")
 

Output:

1/2*log(-16*pi^2*x^2*e^(2*x)*log(2)*sgn(x - 4) + 8*pi^2*x^2*log(2)^2*sgn(x 
 - 4) - 16*pi^2*x^2*e^(2*x)*log(2) + 8*pi^2*x^2*log(2)^2 - 128*x^2*e^(2*x) 
*log(2)^3 + 64*x^2*log(2)^4 + 128*x^2*e^(2*x)*log(2)^2*log(abs(x - 4)) - 6 
4*x^2*log(2)^3*log(abs(x - 4)) - 32*x^2*e^(2*x)*log(2)*log(abs(x - 4))^2 + 
 16*x^2*log(2)^2*log(abs(x - 4))^2 + 8*pi^2*x^2*e^(4*x)*sgn(x - 4) - 32*pi 
^2*x*e^(2*x)*log(2)*sgn(x - 4) + 16*pi^2*x*log(2)^2*sgn(x - 4) + 8*pi^2*x^ 
2*e^(4*x) - 32*pi^2*x*e^(2*x)*log(2) + 16*pi^2*x*log(2)^2 + 64*x^2*e^(4*x) 
*log(2)^2 - 512*x^2*e^(2*x)*log(2)^2 + 256*x^2*log(2)^3 - 256*x*e^(2*x)*lo 
g(2)^3 + 128*x*log(2)^4 - 64*x^2*e^(4*x)*log(2)*log(abs(x - 4)) + 256*x^2* 
e^(2*x)*log(2)*log(abs(x - 4)) - 128*x^2*log(2)^2*log(abs(x - 4)) + 256*x* 
e^(2*x)*log(2)^2*log(abs(x - 4)) - 128*x*log(2)^3*log(abs(x - 4)) + 16*x^2 
*e^(4*x)*log(abs(x - 4))^2 - 64*x*e^(2*x)*log(2)*log(abs(x - 4))^2 + 32*x* 
log(2)^2*log(abs(x - 4))^2 + 16*pi^2*x*e^(4*x)*sgn(x - 4) - 16*pi^2*e^(2*x 
)*log(2)*sgn(x - 4) + 8*pi^2*log(2)^2*sgn(x - 4) + 16*pi^2*x*e^(4*x) + 256 
*x^2*e^(4*x)*log(2) - 16*pi^2*e^(2*x)*log(2) - 496*x^2*e^(2*x)*log(2) + 8* 
pi^2*log(2)^2 + 240*x^2*log(2)^2 + 128*x*e^(4*x)*log(2)^2 - 1024*x*e^(2*x) 
*log(2)^2 + 512*x*log(2)^3 - 128*e^(2*x)*log(2)^3 + 64*log(2)^4 - 128*x^2* 
e^(4*x)*log(abs(x - 4)) - 8*x^2*e^(2*x)*log(abs(x - 4)) + 8*x^2*log(2)*log 
(abs(x - 4)) - 128*x*e^(4*x)*log(2)*log(abs(x - 4)) + 512*x*e^(2*x)*log(2) 
*log(abs(x - 4)) - 256*x*log(2)^2*log(abs(x - 4)) + 128*e^(2*x)*log(2)^...
 

Mupad [F(-1)]

Timed out. \[ \int \frac {e^{4 x} (-256+64 x)+(16-5 x) \log (2)+(-256+64 x) \log ^2(2)+e^{2 x} \left (-16+37 x-8 x^2+(512-128 x) \log (2)\right )+\left (e^{4 x} (-128+32 x)+(4-x) \log (2)+(-128+32 x) \log ^2(2)+e^{2 x} \left (-4+9 x-2 x^2+(256-64 x) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} (-16+4 x)+e^{2 x} (32-8 x) \log (2)+(-16+4 x) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )}{e^{4 x} \left (-256-192 x+64 x^2\right )+\left (16 x-4 x^2\right ) \log (2)+\left (-256-192 x+64 x^2\right ) \log ^2(2)+e^{2 x} \left (-16 x+4 x^2+\left (512+384 x-128 x^2\right ) \log (2)\right )+\left (e^{4 x} \left (-128-96 x+32 x^2\right )+\left (4 x-x^2\right ) \log (2)+\left (-128-96 x+32 x^2\right ) \log ^2(2)+e^{2 x} \left (-4 x+x^2+\left (256+192 x-64 x^2\right ) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} \left (-16-12 x+4 x^2\right )+e^{2 x} \left (32+24 x-8 x^2\right ) \log (2)+\left (-16-12 x+4 x^2\right ) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )} \, dx=\int \frac {\left ({\mathrm {e}}^{2\,x}\,\ln \left (2\right )\,\left (8\,x-32\right )-{\mathrm {e}}^{4\,x}\,\left (4\,x-16\right )-{\ln \left (2\right )}^2\,\left (4\,x-16\right )\right )\,{\ln \left (-\frac {4}{x-4}\right )}^2+\left ({\mathrm {e}}^{2\,x}\,\left (\ln \left (2\right )\,\left (64\,x-256\right )-9\,x+2\,x^2+4\right )-{\ln \left (2\right )}^2\,\left (32\,x-128\right )+\ln \left (2\right )\,\left (x-4\right )-{\mathrm {e}}^{4\,x}\,\left (32\,x-128\right )\right )\,\ln \left (-\frac {4}{x-4}\right )+\ln \left (2\right )\,\left (5\,x-16\right )+{\mathrm {e}}^{2\,x}\,\left (\ln \left (2\right )\,\left (128\,x-512\right )-37\,x+8\,x^2+16\right )-{\ln \left (2\right )}^2\,\left (64\,x-256\right )-{\mathrm {e}}^{4\,x}\,\left (64\,x-256\right )}{\left ({\mathrm {e}}^{4\,x}\,\left (-4\,x^2+12\,x+16\right )+{\ln \left (2\right )}^2\,\left (-4\,x^2+12\,x+16\right )-{\mathrm {e}}^{2\,x}\,\ln \left (2\right )\,\left (-8\,x^2+24\,x+32\right )\right )\,{\ln \left (-\frac {4}{x-4}\right )}^2+\left ({\mathrm {e}}^{4\,x}\,\left (-32\,x^2+96\,x+128\right )-\ln \left (2\right )\,\left (4\,x-x^2\right )+{\ln \left (2\right )}^2\,\left (-32\,x^2+96\,x+128\right )-{\mathrm {e}}^{2\,x}\,\left (\ln \left (2\right )\,\left (-64\,x^2+192\,x+256\right )-4\,x+x^2\right )\right )\,\ln \left (-\frac {4}{x-4}\right )+{\mathrm {e}}^{4\,x}\,\left (-64\,x^2+192\,x+256\right )-\ln \left (2\right )\,\left (16\,x-4\,x^2\right )-{\mathrm {e}}^{2\,x}\,\left (\ln \left (2\right )\,\left (-128\,x^2+384\,x+512\right )-16\,x+4\,x^2\right )+{\ln \left (2\right )}^2\,\left (-64\,x^2+192\,x+256\right )} \,d x \] Input:

int((log(2)*(5*x - 16) + exp(2*x)*(log(2)*(128*x - 512) - 37*x + 8*x^2 + 1 
6) - log(2)^2*(64*x - 256) - log(-4/(x - 4))^2*(log(2)^2*(4*x - 16) + exp( 
4*x)*(4*x - 16) - exp(2*x)*log(2)*(8*x - 32)) + log(-4/(x - 4))*(exp(2*x)* 
(log(2)*(64*x - 256) - 9*x + 2*x^2 + 4) - log(2)^2*(32*x - 128) + log(2)*( 
x - 4) - exp(4*x)*(32*x - 128)) - exp(4*x)*(64*x - 256))/(exp(4*x)*(192*x 
- 64*x^2 + 256) - log(2)*(16*x - 4*x^2) + log(-4/(x - 4))^2*(exp(4*x)*(12* 
x - 4*x^2 + 16) + log(2)^2*(12*x - 4*x^2 + 16) - exp(2*x)*log(2)*(24*x - 8 
*x^2 + 32)) - exp(2*x)*(log(2)*(384*x - 128*x^2 + 512) - 16*x + 4*x^2) + l 
og(-4/(x - 4))*(exp(4*x)*(96*x - 32*x^2 + 128) - log(2)*(4*x - x^2) + log( 
2)^2*(96*x - 32*x^2 + 128) - exp(2*x)*(log(2)*(192*x - 64*x^2 + 256) - 4*x 
 + x^2)) + log(2)^2*(192*x - 64*x^2 + 256)),x)
 

Output:

int((log(2)*(5*x - 16) + exp(2*x)*(log(2)*(128*x - 512) - 37*x + 8*x^2 + 1 
6) - log(2)^2*(64*x - 256) - log(-4/(x - 4))^2*(log(2)^2*(4*x - 16) + exp( 
4*x)*(4*x - 16) - exp(2*x)*log(2)*(8*x - 32)) + log(-4/(x - 4))*(exp(2*x)* 
(log(2)*(64*x - 256) - 9*x + 2*x^2 + 4) - log(2)^2*(32*x - 128) + log(2)*( 
x - 4) - exp(4*x)*(32*x - 128)) - exp(4*x)*(64*x - 256))/(exp(4*x)*(192*x 
- 64*x^2 + 256) - log(2)*(16*x - 4*x^2) + log(-4/(x - 4))^2*(exp(4*x)*(12* 
x - 4*x^2 + 16) + log(2)^2*(12*x - 4*x^2 + 16) - exp(2*x)*log(2)*(24*x - 8 
*x^2 + 32)) - exp(2*x)*(log(2)*(384*x - 128*x^2 + 512) - 16*x + 4*x^2) + l 
og(-4/(x - 4))*(exp(4*x)*(96*x - 32*x^2 + 128) - log(2)*(4*x - x^2) + log( 
2)^2*(96*x - 32*x^2 + 128) - exp(2*x)*(log(2)*(192*x - 64*x^2 + 256) - 4*x 
 + x^2)) + log(2)^2*(192*x - 64*x^2 + 256)), x)
 

Reduce [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 192, normalized size of antiderivative = 5.19 \[ \int \frac {e^{4 x} (-256+64 x)+(16-5 x) \log (2)+(-256+64 x) \log ^2(2)+e^{2 x} \left (-16+37 x-8 x^2+(512-128 x) \log (2)\right )+\left (e^{4 x} (-128+32 x)+(4-x) \log (2)+(-128+32 x) \log ^2(2)+e^{2 x} \left (-4+9 x-2 x^2+(256-64 x) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} (-16+4 x)+e^{2 x} (32-8 x) \log (2)+(-16+4 x) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )}{e^{4 x} \left (-256-192 x+64 x^2\right )+\left (16 x-4 x^2\right ) \log (2)+\left (-256-192 x+64 x^2\right ) \log ^2(2)+e^{2 x} \left (-16 x+4 x^2+\left (512+384 x-128 x^2\right ) \log (2)\right )+\left (e^{4 x} \left (-128-96 x+32 x^2\right )+\left (4 x-x^2\right ) \log (2)+\left (-128-96 x+32 x^2\right ) \log ^2(2)+e^{2 x} \left (-4 x+x^2+\left (256+192 x-64 x^2\right ) \log (2)\right )\right ) \log \left (-\frac {4}{-4+x}\right )+\left (e^{4 x} \left (-16-12 x+4 x^2\right )+e^{2 x} \left (32+24 x-8 x^2\right ) \log (2)+\left (-16-12 x+4 x^2\right ) \log ^2(2)\right ) \log ^2\left (-\frac {4}{-4+x}\right )} \, dx=-\mathrm {log}\left (\mathrm {log}\left (-\frac {4}{x -4}\right )+4\right )-2 \,\mathrm {log}\left (-\sqrt {\mathrm {log}\left (2\right )}+e^{x}\right )-2 \,\mathrm {log}\left (\sqrt {\mathrm {log}\left (2\right )}+e^{x}\right )+\mathrm {log}\left (4 e^{4 x} \mathrm {log}\left (-\frac {4}{x -4}\right ) x +4 e^{4 x} \mathrm {log}\left (-\frac {4}{x -4}\right )+16 e^{4 x} x +16 e^{4 x}-8 e^{2 x} \mathrm {log}\left (-\frac {4}{x -4}\right ) \mathrm {log}\left (2\right ) x -8 e^{2 x} \mathrm {log}\left (-\frac {4}{x -4}\right ) \mathrm {log}\left (2\right )-32 e^{2 x} \mathrm {log}\left (2\right ) x -32 e^{2 x} \mathrm {log}\left (2\right )+e^{2 x} x +4 \,\mathrm {log}\left (-\frac {4}{x -4}\right ) \mathrm {log}\left (2\right )^{2} x +4 \,\mathrm {log}\left (-\frac {4}{x -4}\right ) \mathrm {log}\left (2\right )^{2}+16 \mathrm {log}\left (2\right )^{2} x +16 \mathrm {log}\left (2\right )^{2}-\mathrm {log}\left (2\right ) x \right ) \] Input:

int((((4*x-16)*exp(x)^4+(-8*x+32)*log(2)*exp(x)^2+(4*x-16)*log(2)^2)*log(- 
4/(-4+x))^2+((32*x-128)*exp(x)^4+((-64*x+256)*log(2)-2*x^2+9*x-4)*exp(x)^2 
+(32*x-128)*log(2)^2+(-x+4)*log(2))*log(-4/(-4+x))+(64*x-256)*exp(x)^4+((- 
128*x+512)*log(2)-8*x^2+37*x-16)*exp(x)^2+(64*x-256)*log(2)^2+(-5*x+16)*lo 
g(2))/(((4*x^2-12*x-16)*exp(x)^4+(-8*x^2+24*x+32)*log(2)*exp(x)^2+(4*x^2-1 
2*x-16)*log(2)^2)*log(-4/(-4+x))^2+((32*x^2-96*x-128)*exp(x)^4+((-64*x^2+1 
92*x+256)*log(2)+x^2-4*x)*exp(x)^2+(32*x^2-96*x-128)*log(2)^2+(-x^2+4*x)*l 
og(2))*log(-4/(-4+x))+(64*x^2-192*x-256)*exp(x)^4+((-128*x^2+384*x+512)*lo 
g(2)+4*x^2-16*x)*exp(x)^2+(64*x^2-192*x-256)*log(2)^2+(-4*x^2+16*x)*log(2) 
),x)
 

Output:

 - log(log(( - 4)/(x - 4)) + 4) - 2*log( - sqrt(log(2)) + e**x) - 2*log(sq 
rt(log(2)) + e**x) + log(4*e**(4*x)*log(( - 4)/(x - 4))*x + 4*e**(4*x)*log 
(( - 4)/(x - 4)) + 16*e**(4*x)*x + 16*e**(4*x) - 8*e**(2*x)*log(( - 4)/(x 
- 4))*log(2)*x - 8*e**(2*x)*log(( - 4)/(x - 4))*log(2) - 32*e**(2*x)*log(2 
)*x - 32*e**(2*x)*log(2) + e**(2*x)*x + 4*log(( - 4)/(x - 4))*log(2)**2*x 
+ 4*log(( - 4)/(x - 4))*log(2)**2 + 16*log(2)**2*x + 16*log(2)**2 - log(2) 
*x)