\(\int \frac {e^{-2 x} (-14 x+16 x^2-2 x^3+8 x \log (7-x)+(-28+60 x-8 x^2) \log ^2(7-x))}{81 (-7+x)} \, dx\) [132]

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

Optimal result

Integrand size = 56, antiderivative size = 22 \[ \int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx=\frac {1}{81} e^{-2 x} x \left (x+4 \log ^2(7-x)\right ) \]

[Out]

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

Rubi [F]

\[ \int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx=\int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx \]

[In]

Int[(-14*x + 16*x^2 - 2*x^3 + 8*x*Log[7 - x] + (-28 + 60*x - 8*x^2)*Log[7 - x]^2)/(81*E^(2*x)*(-7 + x)),x]

[Out]

x^2/(81*E^(2*x)) + (4*ExpIntegralEi[2*(7 - x)])/(81*E^14) - (4*Log[7 - x])/(81*E^(2*x)) + (56*ExpIntegralEi[2*
(7 - x)]*Log[7 - x])/(81*E^14) - (56*Defer[Int][ExpIntegralEi[14 - 2*x]/(-7 + x), x])/(81*E^14) - (52*Defer[In
t][Log[7 - x]^2/E^(2*x), x])/81 + (8*Defer[Int][((7 - x)*Log[7 - x]^2)/E^(2*x), x])/81

Rubi steps \begin{align*} \text {integral}& = \frac {1}{81} \int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{-7+x} \, dx \\ & = \frac {1}{81} \int \left (-2 e^{-2 x} (-1+x) x+\frac {8 e^{-2 x} x \log (7-x)}{-7+x}-4 e^{-2 x} (-1+2 x) \log ^2(7-x)\right ) \, dx \\ & = -\left (\frac {2}{81} \int e^{-2 x} (-1+x) x \, dx\right )-\frac {4}{81} \int e^{-2 x} (-1+2 x) \log ^2(7-x) \, dx+\frac {8}{81} \int \frac {e^{-2 x} x \log (7-x)}{-7+x} \, dx \\ & = -\frac {4}{81} e^{-2 x} \log (7-x)+\frac {56 \operatorname {ExpIntegralEi}(2 (7-x)) \log (7-x)}{81 e^{14}}-\frac {2}{81} \int \left (-e^{-2 x} x+e^{-2 x} x^2\right ) \, dx-\frac {4}{81} \int \left (13 e^{-2 x} \log ^2(7-x)-2 e^{-2 x} (7-x) \log ^2(7-x)\right ) \, dx-\frac {8}{81} \int \frac {e^{-2 x}-\frac {14 \operatorname {ExpIntegralEi}(14-2 x)}{e^{14}}}{14-2 x} \, dx \\ & = -\frac {4}{81} e^{-2 x} \log (7-x)+\frac {56 \operatorname {ExpIntegralEi}(2 (7-x)) \log (7-x)}{81 e^{14}}+\frac {2}{81} \int e^{-2 x} x \, dx-\frac {2}{81} \int e^{-2 x} x^2 \, dx-\frac {8}{81} \int \left (-\frac {e^{-2 x}}{2 (-7+x)}+\frac {7 \operatorname {ExpIntegralEi}(14-2 x)}{e^{14} (-7+x)}\right ) \, dx+\frac {8}{81} \int e^{-2 x} (7-x) \log ^2(7-x) \, dx-\frac {52}{81} \int e^{-2 x} \log ^2(7-x) \, dx \\ & = -\frac {1}{81} e^{-2 x} x+\frac {1}{81} e^{-2 x} x^2-\frac {4}{81} e^{-2 x} \log (7-x)+\frac {56 \operatorname {ExpIntegralEi}(2 (7-x)) \log (7-x)}{81 e^{14}}+\frac {1}{81} \int e^{-2 x} \, dx-\frac {2}{81} \int e^{-2 x} x \, dx+\frac {4}{81} \int \frac {e^{-2 x}}{-7+x} \, dx+\frac {8}{81} \int e^{-2 x} (7-x) \log ^2(7-x) \, dx-\frac {52}{81} \int e^{-2 x} \log ^2(7-x) \, dx-\frac {56 \int \frac {\operatorname {ExpIntegralEi}(14-2 x)}{-7+x} \, dx}{81 e^{14}} \\ & = -\frac {1}{162} e^{-2 x}+\frac {1}{81} e^{-2 x} x^2+\frac {4 \operatorname {ExpIntegralEi}(2 (7-x))}{81 e^{14}}-\frac {4}{81} e^{-2 x} \log (7-x)+\frac {56 \operatorname {ExpIntegralEi}(2 (7-x)) \log (7-x)}{81 e^{14}}-\frac {1}{81} \int e^{-2 x} \, dx+\frac {8}{81} \int e^{-2 x} (7-x) \log ^2(7-x) \, dx-\frac {52}{81} \int e^{-2 x} \log ^2(7-x) \, dx-\frac {56 \int \frac {\operatorname {ExpIntegralEi}(14-2 x)}{-7+x} \, dx}{81 e^{14}} \\ & = \frac {1}{81} e^{-2 x} x^2+\frac {4 \operatorname {ExpIntegralEi}(2 (7-x))}{81 e^{14}}-\frac {4}{81} e^{-2 x} \log (7-x)+\frac {56 \operatorname {ExpIntegralEi}(2 (7-x)) \log (7-x)}{81 e^{14}}+\frac {8}{81} \int e^{-2 x} (7-x) \log ^2(7-x) \, dx-\frac {52}{81} \int e^{-2 x} \log ^2(7-x) \, dx-\frac {56 \int \frac {\operatorname {ExpIntegralEi}(14-2 x)}{-7+x} \, dx}{81 e^{14}} \\ \end{align*}

Mathematica [F]

\[ \int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx=\int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx \]

[In]

Integrate[(-14*x + 16*x^2 - 2*x^3 + 8*x*Log[7 - x] + (-28 + 60*x - 8*x^2)*Log[7 - x]^2)/(81*E^(2*x)*(-7 + x)),
x]

[Out]

Integrate[(-14*x + 16*x^2 - 2*x^3 + 8*x*Log[7 - x] + (-28 + 60*x - 8*x^2)*Log[7 - x]^2)/(E^(2*x)*(-7 + x)), x]
/81

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.18

method result size
risch \(\frac {4 x \,{\mathrm e}^{-2 x} \ln \left (-x +7\right )^{2}}{81}+\frac {x^{2} {\mathrm e}^{-2 x}}{81}\) \(26\)
parallelrisch \(-\frac {\left (-56 \ln \left (-x +7\right )^{2} x -14 x^{2}\right ) {\mathrm e}^{-2 x}}{1134}\) \(29\)

[In]

int(((-8*x^2+60*x-28)*ln(-x+7)^2+8*x*ln(-x+7)-2*x^3+16*x^2-14*x)/(-7+x)/exp(2*ln(3)+x)^2,x,method=_RETURNVERBO
SE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.55 \[ \int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx=4 \, x e^{\left (-2 \, x - 4 \, \log \left (3\right )\right )} \log \left (-x + 7\right )^{2} + x^{2} e^{\left (-2 \, x - 4 \, \log \left (3\right )\right )} \]

[In]

integrate(((-8*x^2+60*x-28)*log(-x+7)^2+8*x*log(-x+7)-2*x^3+16*x^2-14*x)/(-7+x)/exp(2*log(3)+x)^2,x, algorithm
="fricas")

[Out]

4*x*e^(-2*x - 4*log(3))*log(-x + 7)^2 + x^2*e^(-2*x - 4*log(3))

Sympy [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.86 \[ \int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx=\frac {\left (x^{2} + 4 x \log {\left (7 - x \right )}^{2}\right ) e^{- 2 x}}{81} \]

[In]

integrate(((-8*x**2+60*x-28)*ln(-x+7)**2+8*x*ln(-x+7)-2*x**3+16*x**2-14*x)/(-7+x)/exp(2*ln(3)+x)**2,x)

[Out]

(x**2 + 4*x*log(7 - x)**2)*exp(-2*x)/81

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.14 \[ \int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx=\frac {4}{81} \, x e^{\left (-2 \, x\right )} \log \left (-x + 7\right )^{2} + \frac {1}{81} \, x^{2} e^{\left (-2 \, x\right )} \]

[In]

integrate(((-8*x^2+60*x-28)*log(-x+7)^2+8*x*log(-x+7)-2*x^3+16*x^2-14*x)/(-7+x)/exp(2*log(3)+x)^2,x, algorithm
="maxima")

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 71 vs. \(2 (23) = 46\).

Time = 0.26 (sec) , antiderivative size = 71, normalized size of antiderivative = 3.23 \[ \int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx=\frac {1}{81} \, {\left (4 \, {\left (x - 7\right )} e^{\left (-2 \, x + 14\right )} \log \left (-x + 7\right )^{2} + {\left (x - 7\right )}^{2} e^{\left (-2 \, x + 14\right )} + 28 \, e^{\left (-2 \, x + 14\right )} \log \left (-x + 7\right )^{2} + 14 \, {\left (x - 7\right )} e^{\left (-2 \, x + 14\right )} + 49 \, e^{\left (-2 \, x + 14\right )}\right )} e^{\left (-14\right )} \]

[In]

integrate(((-8*x^2+60*x-28)*log(-x+7)^2+8*x*log(-x+7)-2*x^3+16*x^2-14*x)/(-7+x)/exp(2*log(3)+x)^2,x, algorithm
="giac")

[Out]

1/81*(4*(x - 7)*e^(-2*x + 14)*log(-x + 7)^2 + (x - 7)^2*e^(-2*x + 14) + 28*e^(-2*x + 14)*log(-x + 7)^2 + 14*(x
 - 7)*e^(-2*x + 14) + 49*e^(-2*x + 14))*e^(-14)

Mupad [F(-1)]

Timed out. \[ \int \frac {e^{-2 x} \left (-14 x+16 x^2-2 x^3+8 x \log (7-x)+\left (-28+60 x-8 x^2\right ) \log ^2(7-x)\right )}{81 (-7+x)} \, dx=\int -\frac {{\mathrm {e}}^{-2\,x-4\,\ln \left (3\right )}\,\left (14\,x-8\,x\,\ln \left (7-x\right )+{\ln \left (7-x\right )}^2\,\left (8\,x^2-60\,x+28\right )-16\,x^2+2\,x^3\right )}{x-7} \,d x \]

[In]

int(-(exp(- 2*x - 4*log(3))*(14*x - 8*x*log(7 - x) + log(7 - x)^2*(8*x^2 - 60*x + 28) - 16*x^2 + 2*x^3))/(x -
7),x)

[Out]

int(-(exp(- 2*x - 4*log(3))*(14*x - 8*x*log(7 - x) + log(7 - x)^2*(8*x^2 - 60*x + 28) - 16*x^2 + 2*x^3))/(x -
7), x)