\(\int \frac {x-e^{5 x} x-5 x^2+(1-x^2+e^{5 x} (-1+x^2)) \log ^2(e^{-5 x} (x-e^{5 x} x))}{(-x^2+e^{5 x} x^2) \log ^2(e^{-5 x} (x-e^{5 x} x))} \, dx\) [6584]

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

Optimal result

Integrand size = 90, antiderivative size = 20 \[ \int \frac {x-e^{5 x} x-5 x^2+\left (1-x^2+e^{5 x} \left (-1+x^2\right )\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )}{\left (-x^2+e^{5 x} x^2\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )} \, dx=1+\frac {1}{x}+x+\frac {1}{\log \left (-x+e^{-5 x} x\right )} \]

[Out]

1+1/ln(x/exp(5*x)-x)+x+1/x

Rubi [F]

\[ \int \frac {x-e^{5 x} x-5 x^2+\left (1-x^2+e^{5 x} \left (-1+x^2\right )\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )}{\left (-x^2+e^{5 x} x^2\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )} \, dx=\int \frac {x-e^{5 x} x-5 x^2+\left (1-x^2+e^{5 x} \left (-1+x^2\right )\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )}{\left (-x^2+e^{5 x} x^2\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )} \, dx \]

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.73 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85 \[ \int \frac {x-e^{5 x} x-5 x^2+\left (1-x^2+e^{5 x} \left (-1+x^2\right )\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )}{\left (-x^2+e^{5 x} x^2\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )} \, dx=\frac {1}{x}+x+\frac {1}{\log \left (\left (-1+e^{-5 x}\right ) x\right )} \]

[In]

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

[Out]

x^(-1) + x + Log[(-1 + E^(-5*x))*x]^(-1)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(63\) vs. \(2(21)=42\).

Time = 0.68 (sec) , antiderivative size = 64, normalized size of antiderivative = 3.20

method result size
norman \(\frac {x +x^{2} \ln \left (\left (-x \,{\mathrm e}^{5 x}+x \right ) {\mathrm e}^{-5 x}\right )+\ln \left (\left (-x \,{\mathrm e}^{5 x}+x \right ) {\mathrm e}^{-5 x}\right )}{x \ln \left (\left (-x \,{\mathrm e}^{5 x}+x \right ) {\mathrm e}^{-5 x}\right )}\) \(64\)
risch \(\frac {x^{2}+1}{x}+\frac {2 i}{\pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{5 x}-1\right )\right ) \operatorname {csgn}\left (i {\mathrm e}^{-5 x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-5 x} \left ({\mathrm e}^{5 x}-1\right )\right )-\pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{5 x}-1\right )\right ) \operatorname {csgn}\left (i {\mathrm e}^{-5 x} \left ({\mathrm e}^{5 x}-1\right )\right )^{2}-\pi \,\operatorname {csgn}\left (i {\mathrm e}^{-5 x}\right ) \operatorname {csgn}\left (i {\mathrm e}^{-5 x} \left ({\mathrm e}^{5 x}-1\right )\right )^{2}+\pi \operatorname {csgn}\left (i {\mathrm e}^{-5 x} \left ({\mathrm e}^{5 x}-1\right )\right )^{3}-\pi \,\operatorname {csgn}\left (i {\mathrm e}^{-5 x} \left ({\mathrm e}^{5 x}-1\right )\right ) {\operatorname {csgn}\left (i x \left ({\mathrm e}^{5 x}-1\right ) {\mathrm e}^{-5 x}\right )}^{2}+\pi \,\operatorname {csgn}\left (i {\mathrm e}^{-5 x} \left ({\mathrm e}^{5 x}-1\right )\right ) \operatorname {csgn}\left (i x \left ({\mathrm e}^{5 x}-1\right ) {\mathrm e}^{-5 x}\right ) \operatorname {csgn}\left (i x \right )-\pi {\operatorname {csgn}\left (i x \left ({\mathrm e}^{5 x}-1\right ) {\mathrm e}^{-5 x}\right )}^{3}+2 \pi {\operatorname {csgn}\left (i x \left ({\mathrm e}^{5 x}-1\right ) {\mathrm e}^{-5 x}\right )}^{2}-\pi {\operatorname {csgn}\left (i x \left ({\mathrm e}^{5 x}-1\right ) {\mathrm e}^{-5 x}\right )}^{2} \operatorname {csgn}\left (i x \right )-2 \pi +2 i \ln \left (x \right )-2 i \ln \left ({\mathrm e}^{5 x}\right )+2 i \ln \left ({\mathrm e}^{5 x}-1\right )}\) \(286\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

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

Time = 0.26 (sec) , antiderivative size = 48, normalized size of antiderivative = 2.40 \[ \int \frac {x-e^{5 x} x-5 x^2+\left (1-x^2+e^{5 x} \left (-1+x^2\right )\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )}{\left (-x^2+e^{5 x} x^2\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )} \, dx=\frac {{\left (x^{2} + 1\right )} \log \left (-{\left (x e^{\left (5 \, x\right )} - x\right )} e^{\left (-5 \, x\right )}\right ) + x}{x \log \left (-{\left (x e^{\left (5 \, x\right )} - x\right )} e^{\left (-5 \, x\right )}\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {x-e^{5 x} x-5 x^2+\left (1-x^2+e^{5 x} \left (-1+x^2\right )\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )}{\left (-x^2+e^{5 x} x^2\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )} \, dx=x + \frac {1}{\log {\left (\left (- x e^{5 x} + x\right ) e^{- 5 x} \right )}} + \frac {1}{x} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (19) = 38\).

Time = 0.34 (sec) , antiderivative size = 100, normalized size of antiderivative = 5.00 \[ \int \frac {x-e^{5 x} x-5 x^2+\left (1-x^2+e^{5 x} \left (-1+x^2\right )\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )}{\left (-x^2+e^{5 x} x^2\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )} \, dx=\frac {5 \, x^{3} - {\left (x^{2} + 1\right )} \log \left (x\right ) - {\left (x^{2} + 1\right )} \log \left (e^{\left (4 \, x\right )} + e^{\left (3 \, x\right )} + e^{\left (2 \, x\right )} + e^{x} + 1\right ) - {\left (x^{2} + 1\right )} \log \left (-e^{x} + 1\right ) + 4 \, x}{5 \, x^{2} - x \log \left (x\right ) - x \log \left (e^{\left (4 \, x\right )} + e^{\left (3 \, x\right )} + e^{\left (2 \, x\right )} + e^{x} + 1\right ) - x \log \left (-e^{x} + 1\right )} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (19) = 38\).

Time = 0.29 (sec) , antiderivative size = 63, normalized size of antiderivative = 3.15 \[ \int \frac {x-e^{5 x} x-5 x^2+\left (1-x^2+e^{5 x} \left (-1+x^2\right )\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )}{\left (-x^2+e^{5 x} x^2\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )} \, dx=\frac {x^{2} \log \left (-{\left (x e^{\left (5 \, x\right )} - x\right )} e^{\left (-5 \, x\right )}\right ) + x + \log \left (-{\left (x e^{\left (5 \, x\right )} - x\right )} e^{\left (-5 \, x\right )}\right )}{x \log \left (-{\left (x e^{\left (5 \, x\right )} - x\right )} e^{\left (-5 \, x\right )}\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.32 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90 \[ \int \frac {x-e^{5 x} x-5 x^2+\left (1-x^2+e^{5 x} \left (-1+x^2\right )\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )}{\left (-x^2+e^{5 x} x^2\right ) \log ^2\left (e^{-5 x} \left (x-e^{5 x} x\right )\right )} \, dx=x+\frac {1}{\ln \left (x\,{\mathrm {e}}^{-5\,x}-x\right )}+\frac {1}{x} \]

[In]

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

[Out]

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