3.18.77 \(\int \frac {e^{2 x} (15 x^2+20 x^3-4 x^4)+e^{2 x} (24 x+19 x^2-2 x^3) \log (4-x)+e^{2 x} (2 x+2 x^2) \log ^2(4-x)}{-2 x^2+e^{2 x} (12 x^3-2 x^4)+(-4 x+e^{2 x} (12 x^2-x^3)) \log (4-x)+(-2+e^{2 x} x^2) \log ^2(4-x)} \, dx\) [1777]

3.18.77.1 Optimal result
3.18.77.2 Mathematica [A] (verified)
3.18.77.3 Rubi [F]
3.18.77.4 Maple [A] (verified)
3.18.77.5 Fricas [B] (verification not implemented)
3.18.77.6 Sympy [F(-2)]
3.18.77.7 Maxima [B] (verification not implemented)
3.18.77.8 Giac [B] (verification not implemented)
3.18.77.9 Mupad [F(-1)]

3.18.77.1 Optimal result

Integrand size = 146, antiderivative size = 33 \[ \int \frac {e^{2 x} \left (15 x^2+20 x^3-4 x^4\right )+e^{2 x} \left (24 x+19 x^2-2 x^3\right ) \log (4-x)+e^{2 x} \left (2 x+2 x^2\right ) \log ^2(4-x)}{-2 x^2+e^{2 x} \left (12 x^3-2 x^4\right )+\left (-4 x+e^{2 x} \left (12 x^2-x^3\right )\right ) \log (4-x)+\left (-2+e^{2 x} x^2\right ) \log ^2(4-x)} \, dx=\log \left (-2+e^{2 x} x \left (x-\frac {3 (-x+(-3+x) x)}{x+\log (4-x)}\right )\right ) \]

output
ln(x*exp(x)^2*(x-3*(x*(-3+x)-x)/(x+ln(-x+4)))-2)
 
3.18.77.2 Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.85 \[ \int \frac {e^{2 x} \left (15 x^2+20 x^3-4 x^4\right )+e^{2 x} \left (24 x+19 x^2-2 x^3\right ) \log (4-x)+e^{2 x} \left (2 x+2 x^2\right ) \log ^2(4-x)}{-2 x^2+e^{2 x} \left (12 x^3-2 x^4\right )+\left (-4 x+e^{2 x} \left (12 x^2-x^3\right )\right ) \log (4-x)+\left (-2+e^{2 x} x^2\right ) \log ^2(4-x)} \, dx=-\log (x+\log (4-x))+\log \left (2 x-12 e^{2 x} x^2+2 e^{2 x} x^3+2 \log (4-x)-e^{2 x} x^2 \log (4-x)\right ) \]

input
Integrate[(E^(2*x)*(15*x^2 + 20*x^3 - 4*x^4) + E^(2*x)*(24*x + 19*x^2 - 2* 
x^3)*Log[4 - x] + E^(2*x)*(2*x + 2*x^2)*Log[4 - x]^2)/(-2*x^2 + E^(2*x)*(1 
2*x^3 - 2*x^4) + (-4*x + E^(2*x)*(12*x^2 - x^3))*Log[4 - x] + (-2 + E^(2*x 
)*x^2)*Log[4 - x]^2),x]
 
output
-Log[x + Log[4 - x]] + Log[2*x - 12*E^(2*x)*x^2 + 2*E^(2*x)*x^3 + 2*Log[4 
- x] - E^(2*x)*x^2*Log[4 - x]]
 
3.18.77.3 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 {e^{2 x} \left (2 x^2+2 x\right ) \log ^2(4-x)+e^{2 x} \left (-2 x^3+19 x^2+24 x\right ) \log (4-x)+e^{2 x} \left (-4 x^4+20 x^3+15 x^2\right )}{-2 x^2+\left (e^{2 x} x^2-2\right ) \log ^2(4-x)+e^{2 x} \left (12 x^3-2 x^4\right )+\left (e^{2 x} \left (12 x^2-x^3\right )-4 x\right ) \log (4-x)} \, dx\)

\(\Big \downarrow \) 7292

\(\displaystyle \int \frac {e^{2 x} x \left (4 x^3-20 x^2+2 x^2 \log (4-x)-15 x-2 x \log ^2(4-x)-2 \log ^2(4-x)-19 x \log (4-x)-24 \log (4-x)\right )}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} x^2 \log (4-x)+2 x+2 \log (4-x)\right )}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (-\frac {2 e^{2 x} x^2 \log ^2(4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} x^2 \log (4-x)+2 x+2 \log (4-x)\right )}-\frac {2 e^{2 x} x \log ^2(4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} x^2 \log (4-x)+2 x+2 \log (4-x)\right )}-\frac {20 e^{2 x} x^3}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} x^2 \log (4-x)+2 x+2 \log (4-x)\right )}+\frac {2 e^{2 x} x^3 \log (4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} x^2 \log (4-x)+2 x+2 \log (4-x)\right )}-\frac {15 e^{2 x} x^2}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} x^2 \log (4-x)+2 x+2 \log (4-x)\right )}-\frac {19 e^{2 x} x^2 \log (4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} x^2 \log (4-x)+2 x+2 \log (4-x)\right )}-\frac {24 e^{2 x} x \log (4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} x^2 \log (4-x)+2 x+2 \log (4-x)\right )}+\frac {4 e^{2 x} x^4}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} x^2 \log (4-x)+2 x+2 \log (4-x)\right )}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -2 \int \frac {e^{2 x} x \log ^2(4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} \log (4-x) x^2+2 x+2 \log (4-x)\right )}dx-2 \int \frac {e^{2 x} x^2 \log ^2(4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} \log (4-x) x^2+2 x+2 \log (4-x)\right )}dx-15 \int \frac {e^{2 x} x^2}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} \log (4-x) x^2+2 x+2 \log (4-x)\right )}dx-20 \int \frac {e^{2 x} x^3}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} \log (4-x) x^2+2 x+2 \log (4-x)\right )}dx-24 \int \frac {e^{2 x} x \log (4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} \log (4-x) x^2+2 x+2 \log (4-x)\right )}dx-19 \int \frac {e^{2 x} x^2 \log (4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} \log (4-x) x^2+2 x+2 \log (4-x)\right )}dx+2 \int \frac {e^{2 x} x^3 \log (4-x)}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} \log (4-x) x^2+2 x+2 \log (4-x)\right )}dx+4 \int \frac {e^{2 x} x^4}{(x+\log (4-x)) \left (2 e^{2 x} x^3-12 e^{2 x} x^2-e^{2 x} \log (4-x) x^2+2 x+2 \log (4-x)\right )}dx\)

input
Int[(E^(2*x)*(15*x^2 + 20*x^3 - 4*x^4) + E^(2*x)*(24*x + 19*x^2 - 2*x^3)*L 
og[4 - x] + E^(2*x)*(2*x + 2*x^2)*Log[4 - x]^2)/(-2*x^2 + E^(2*x)*(12*x^3 
- 2*x^4) + (-4*x + E^(2*x)*(12*x^2 - x^3))*Log[4 - x] + (-2 + E^(2*x)*x^2) 
*Log[4 - x]^2),x]
 
output
$Aborted
 

3.18.77.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7292
Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =! 
= u]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
3.18.77.4 Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.64

method result size
parallelrisch \(-\ln \left (x +\ln \left (-x +4\right )\right )+\ln \left ({\mathrm e}^{2 x} x^{3}-\frac {\ln \left (-x +4\right ) {\mathrm e}^{2 x} x^{2}}{2}-6 \,{\mathrm e}^{2 x} x^{2}+x +\ln \left (-x +4\right )\right )\) \(54\)
risch \(2 \ln \left (x \right )+\ln \left ({\mathrm e}^{2 x}-\frac {2}{x^{2}}\right )+\ln \left (\ln \left (-x +4\right )-\frac {2 x \left ({\mathrm e}^{2 x} x^{2}-6 x \,{\mathrm e}^{2 x}+1\right )}{{\mathrm e}^{2 x} x^{2}-2}\right )-\ln \left (x +\ln \left (-x +4\right )\right )\) \(68\)

input
int(((2*x^2+2*x)*exp(x)^2*ln(-x+4)^2+(-2*x^3+19*x^2+24*x)*exp(x)^2*ln(-x+4 
)+(-4*x^4+20*x^3+15*x^2)*exp(x)^2)/((exp(x)^2*x^2-2)*ln(-x+4)^2+((-x^3+12* 
x^2)*exp(x)^2-4*x)*ln(-x+4)+(-2*x^4+12*x^3)*exp(x)^2-2*x^2),x,method=_RETU 
RNVERBOSE)
 
output
-ln(x+ln(-x+4))+ln(exp(x)^2*x^3-1/2*ln(-x+4)*exp(x)^2*x^2-6*exp(x)^2*x^2+x 
+ln(-x+4))
 
3.18.77.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (32) = 64\).

Time = 0.26 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.52 \[ \int \frac {e^{2 x} \left (15 x^2+20 x^3-4 x^4\right )+e^{2 x} \left (24 x+19 x^2-2 x^3\right ) \log (4-x)+e^{2 x} \left (2 x+2 x^2\right ) \log ^2(4-x)}{-2 x^2+e^{2 x} \left (12 x^3-2 x^4\right )+\left (-4 x+e^{2 x} \left (12 x^2-x^3\right )\right ) \log (4-x)+\left (-2+e^{2 x} x^2\right ) \log ^2(4-x)} \, dx=-\log \left (x + \log \left (-x + 4\right )\right ) + 2 \, \log \left (x\right ) + \log \left (-\frac {2 \, {\left (x^{3} - 6 \, x^{2}\right )} e^{\left (2 \, x\right )} - {\left (x^{2} e^{\left (2 \, x\right )} - 2\right )} \log \left (-x + 4\right ) + 2 \, x}{x^{2} e^{\left (2 \, x\right )} - 2}\right ) + \log \left (\frac {x^{2} e^{\left (2 \, x\right )} - 2}{x^{2}}\right ) \]

input
integrate(((2*x^2+2*x)*exp(x)^2*log(-x+4)^2+(-2*x^3+19*x^2+24*x)*exp(x)^2* 
log(-x+4)+(-4*x^4+20*x^3+15*x^2)*exp(x)^2)/((exp(x)^2*x^2-2)*log(-x+4)^2+( 
(-x^3+12*x^2)*exp(x)^2-4*x)*log(-x+4)+(-2*x^4+12*x^3)*exp(x)^2-2*x^2),x, a 
lgorithm=\
 
output
-log(x + log(-x + 4)) + 2*log(x) + log(-(2*(x^3 - 6*x^2)*e^(2*x) - (x^2*e^ 
(2*x) - 2)*log(-x + 4) + 2*x)/(x^2*e^(2*x) - 2)) + log((x^2*e^(2*x) - 2)/x 
^2)
 
3.18.77.6 Sympy [F(-2)]

Exception generated. \[ \int \frac {e^{2 x} \left (15 x^2+20 x^3-4 x^4\right )+e^{2 x} \left (24 x+19 x^2-2 x^3\right ) \log (4-x)+e^{2 x} \left (2 x+2 x^2\right ) \log ^2(4-x)}{-2 x^2+e^{2 x} \left (12 x^3-2 x^4\right )+\left (-4 x+e^{2 x} \left (12 x^2-x^3\right )\right ) \log (4-x)+\left (-2+e^{2 x} x^2\right ) \log ^2(4-x)} \, dx=\text {Exception raised: PolynomialError} \]

input
integrate(((2*x**2+2*x)*exp(x)**2*ln(-x+4)**2+(-2*x**3+19*x**2+24*x)*exp(x 
)**2*ln(-x+4)+(-4*x**4+20*x**3+15*x**2)*exp(x)**2)/((exp(x)**2*x**2-2)*ln( 
-x+4)**2+((-x**3+12*x**2)*exp(x)**2-4*x)*ln(-x+4)+(-2*x**4+12*x**3)*exp(x) 
**2-2*x**2),x)
 
output
Exception raised: PolynomialError >> 1/(x - 4) contains an element of the 
set of generators.
 
3.18.77.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (32) = 64\).

Time = 0.27 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.52 \[ \int \frac {e^{2 x} \left (15 x^2+20 x^3-4 x^4\right )+e^{2 x} \left (24 x+19 x^2-2 x^3\right ) \log (4-x)+e^{2 x} \left (2 x+2 x^2\right ) \log ^2(4-x)}{-2 x^2+e^{2 x} \left (12 x^3-2 x^4\right )+\left (-4 x+e^{2 x} \left (12 x^2-x^3\right )\right ) \log (4-x)+\left (-2+e^{2 x} x^2\right ) \log ^2(4-x)} \, dx=-\log \left (x + \log \left (-x + 4\right )\right ) + 2 \, \log \left (x\right ) + \log \left (-\frac {2 \, {\left (x^{3} - 6 \, x^{2}\right )} e^{\left (2 \, x\right )} - {\left (x^{2} e^{\left (2 \, x\right )} - 2\right )} \log \left (-x + 4\right ) + 2 \, x}{x^{2} e^{\left (2 \, x\right )} - 2}\right ) + \log \left (\frac {x^{2} e^{\left (2 \, x\right )} - 2}{x^{2}}\right ) \]

input
integrate(((2*x^2+2*x)*exp(x)^2*log(-x+4)^2+(-2*x^3+19*x^2+24*x)*exp(x)^2* 
log(-x+4)+(-4*x^4+20*x^3+15*x^2)*exp(x)^2)/((exp(x)^2*x^2-2)*log(-x+4)^2+( 
(-x^3+12*x^2)*exp(x)^2-4*x)*log(-x+4)+(-2*x^4+12*x^3)*exp(x)^2-2*x^2),x, a 
lgorithm=\
 
output
-log(x + log(-x + 4)) + 2*log(x) + log(-(2*(x^3 - 6*x^2)*e^(2*x) - (x^2*e^ 
(2*x) - 2)*log(-x + 4) + 2*x)/(x^2*e^(2*x) - 2)) + log((x^2*e^(2*x) - 2)/x 
^2)
 
3.18.77.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 96 vs. \(2 (32) = 64\).

Time = 0.33 (sec) , antiderivative size = 96, normalized size of antiderivative = 2.91 \[ \int \frac {e^{2 x} \left (15 x^2+20 x^3-4 x^4\right )+e^{2 x} \left (24 x+19 x^2-2 x^3\right ) \log (4-x)+e^{2 x} \left (2 x+2 x^2\right ) \log ^2(4-x)}{-2 x^2+e^{2 x} \left (12 x^3-2 x^4\right )+\left (-4 x+e^{2 x} \left (12 x^2-x^3\right )\right ) \log (4-x)+\left (-2+e^{2 x} x^2\right ) \log ^2(4-x)} \, dx=\log \left (-2 \, {\left (x - 4\right )}^{3} e^{\left (2 \, x\right )} + {\left (x - 4\right )}^{2} e^{\left (2 \, x\right )} \log \left (-x + 4\right ) - 12 \, {\left (x - 4\right )}^{2} e^{\left (2 \, x\right )} + 8 \, {\left (x - 4\right )} e^{\left (2 \, x\right )} \log \left (-x + 4\right ) + 16 \, e^{\left (2 \, x\right )} \log \left (-x + 4\right ) - 2 \, x + 64 \, e^{\left (2 \, x\right )} - 2 \, \log \left (-x + 4\right )\right ) - \log \left (x + \log \left (-x + 4\right )\right ) \]

input
integrate(((2*x^2+2*x)*exp(x)^2*log(-x+4)^2+(-2*x^3+19*x^2+24*x)*exp(x)^2* 
log(-x+4)+(-4*x^4+20*x^3+15*x^2)*exp(x)^2)/((exp(x)^2*x^2-2)*log(-x+4)^2+( 
(-x^3+12*x^2)*exp(x)^2-4*x)*log(-x+4)+(-2*x^4+12*x^3)*exp(x)^2-2*x^2),x, a 
lgorithm=\
 
output
log(-2*(x - 4)^3*e^(2*x) + (x - 4)^2*e^(2*x)*log(-x + 4) - 12*(x - 4)^2*e^ 
(2*x) + 8*(x - 4)*e^(2*x)*log(-x + 4) + 16*e^(2*x)*log(-x + 4) - 2*x + 64* 
e^(2*x) - 2*log(-x + 4)) - log(x + log(-x + 4))
 
3.18.77.9 Mupad [F(-1)]

Timed out. \[ \int \frac {e^{2 x} \left (15 x^2+20 x^3-4 x^4\right )+e^{2 x} \left (24 x+19 x^2-2 x^3\right ) \log (4-x)+e^{2 x} \left (2 x+2 x^2\right ) \log ^2(4-x)}{-2 x^2+e^{2 x} \left (12 x^3-2 x^4\right )+\left (-4 x+e^{2 x} \left (12 x^2-x^3\right )\right ) \log (4-x)+\left (-2+e^{2 x} x^2\right ) \log ^2(4-x)} \, dx=\int \frac {{\mathrm {e}}^{2\,x}\,\left (2\,x^2+2\,x\right )\,{\ln \left (4-x\right )}^2+{\mathrm {e}}^{2\,x}\,\left (-2\,x^3+19\,x^2+24\,x\right )\,\ln \left (4-x\right )+{\mathrm {e}}^{2\,x}\,\left (-4\,x^4+20\,x^3+15\,x^2\right )}{{\ln \left (4-x\right )}^2\,\left (x^2\,{\mathrm {e}}^{2\,x}-2\right )+{\mathrm {e}}^{2\,x}\,\left (12\,x^3-2\,x^4\right )-\ln \left (4-x\right )\,\left (4\,x-{\mathrm {e}}^{2\,x}\,\left (12\,x^2-x^3\right )\right )-2\,x^2} \,d x \]

input
int((exp(2*x)*(15*x^2 + 20*x^3 - 4*x^4) + exp(2*x)*log(4 - x)^2*(2*x + 2*x 
^2) + exp(2*x)*log(4 - x)*(24*x + 19*x^2 - 2*x^3))/(log(4 - x)^2*(x^2*exp( 
2*x) - 2) + exp(2*x)*(12*x^3 - 2*x^4) - log(4 - x)*(4*x - exp(2*x)*(12*x^2 
 - x^3)) - 2*x^2),x)
 
output
int((exp(2*x)*(15*x^2 + 20*x^3 - 4*x^4) + exp(2*x)*log(4 - x)^2*(2*x + 2*x 
^2) + exp(2*x)*log(4 - x)*(24*x + 19*x^2 - 2*x^3))/(log(4 - x)^2*(x^2*exp( 
2*x) - 2) + exp(2*x)*(12*x^3 - 2*x^4) - log(4 - x)*(4*x - exp(2*x)*(12*x^2 
 - x^3)) - 2*x^2), x)