\(\int \frac {-x-98 x^2+e^x (-28 x^2-14 x^3)+e^{2 x} (-2 x^2-2 x^3)+(3+x+49 x^2+14 e^x x^2+e^{2 x} x^2) \log (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2)}{3 x^2+x^3+49 x^4+14 e^x x^4+e^{2 x} x^4} \, dx\) [652]

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

Optimal result

Integrand size = 127, antiderivative size = 23 \[ \int \frac {-x-98 x^2+e^x \left (-28 x^2-14 x^3\right )+e^{2 x} \left (-2 x^2-2 x^3\right )+\left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right ) \log \left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right )}{3 x^2+x^3+49 x^4+14 e^x x^4+e^{2 x} x^4} \, dx=\frac {x-\log \left (3+x+\left (7+e^x\right )^2 x^2\right )}{x} \]

[Out]

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

Rubi [A] (verified)

Time = 2.34 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.87, number of steps used = 28, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.039, Rules used = {6820, 14, 6874, 45, 2631} \[ \int \frac {-x-98 x^2+e^x \left (-28 x^2-14 x^3\right )+e^{2 x} \left (-2 x^2-2 x^3\right )+\left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right ) \log \left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right )}{3 x^2+x^3+49 x^4+14 e^x x^4+e^{2 x} x^4} \, dx=-\frac {\log \left (\left (e^x+7\right )^2 x^2+x+3\right )}{x} \]

[In]

Int[(-x - 98*x^2 + E^x*(-28*x^2 - 14*x^3) + E^(2*x)*(-2*x^2 - 2*x^3) + (3 + x + 49*x^2 + 14*E^x*x^2 + E^(2*x)*
x^2)*Log[3 + x + 49*x^2 + 14*E^x*x^2 + E^(2*x)*x^2])/(3*x^2 + x^3 + 49*x^4 + 14*E^x*x^4 + E^(2*x)*x^4),x]

[Out]

-(Log[3 + x + (7 + E^x)^2*x^2]/x)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2631

Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[(a + b*x)^(m + 1)*(Log[u]/(b*(m + 1))), x] - Dist[1/
(b*(m + 1)), Int[SimplifyIntegrand[(a + b*x)^(m + 1)*(D[u, x]/u), x], x], x] /; FreeQ[{a, b, m}, x] && Inverse
FunctionFreeQ[u, x] && NeQ[m, -1]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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

Mathematica [A] (verified)

Time = 0.65 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.87 \[ \int \frac {-x-98 x^2+e^x \left (-28 x^2-14 x^3\right )+e^{2 x} \left (-2 x^2-2 x^3\right )+\left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right ) \log \left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right )}{3 x^2+x^3+49 x^4+14 e^x x^4+e^{2 x} x^4} \, dx=-\frac {\log \left (3+x+\left (7+e^x\right )^2 x^2\right )}{x} \]

[In]

Integrate[(-x - 98*x^2 + E^x*(-28*x^2 - 14*x^3) + E^(2*x)*(-2*x^2 - 2*x^3) + (3 + x + 49*x^2 + 14*E^x*x^2 + E^
(2*x)*x^2)*Log[3 + x + 49*x^2 + 14*E^x*x^2 + E^(2*x)*x^2])/(3*x^2 + x^3 + 49*x^4 + 14*E^x*x^4 + E^(2*x)*x^4),x
]

[Out]

-(Log[3 + x + (7 + E^x)^2*x^2]/x)

Maple [A] (verified)

Time = 0.51 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.30

method result size
risch \(-\frac {\ln \left ({\mathrm e}^{2 x} x^{2}+14 \,{\mathrm e}^{x} x^{2}+49 x^{2}+x +3\right )}{x}\) \(30\)
parallelrisch \(-\frac {\ln \left ({\mathrm e}^{2 x} x^{2}+14 \,{\mathrm e}^{x} x^{2}+49 x^{2}+x +3\right )}{x}\) \(30\)

[In]

int(((exp(x)^2*x^2+14*exp(x)*x^2+49*x^2+x+3)*ln(exp(x)^2*x^2+14*exp(x)*x^2+49*x^2+x+3)+(-2*x^3-2*x^2)*exp(x)^2
+(-14*x^3-28*x^2)*exp(x)-98*x^2-x)/(exp(x)^2*x^4+14*exp(x)*x^4+49*x^4+x^3+3*x^2),x,method=_RETURNVERBOSE)

[Out]

-1/x*ln(exp(2*x)*x^2+14*exp(x)*x^2+49*x^2+x+3)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26 \[ \int \frac {-x-98 x^2+e^x \left (-28 x^2-14 x^3\right )+e^{2 x} \left (-2 x^2-2 x^3\right )+\left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right ) \log \left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right )}{3 x^2+x^3+49 x^4+14 e^x x^4+e^{2 x} x^4} \, dx=-\frac {\log \left (x^{2} e^{\left (2 \, x\right )} + 14 \, x^{2} e^{x} + 49 \, x^{2} + x + 3\right )}{x} \]

[In]

integrate(((exp(x)^2*x^2+14*exp(x)*x^2+49*x^2+x+3)*log(exp(x)^2*x^2+14*exp(x)*x^2+49*x^2+x+3)+(-2*x^3-2*x^2)*e
xp(x)^2+(-14*x^3-28*x^2)*exp(x)-98*x^2-x)/(exp(x)^2*x^4+14*exp(x)*x^4+49*x^4+x^3+3*x^2),x, algorithm="fricas")

[Out]

-log(x^2*e^(2*x) + 14*x^2*e^x + 49*x^2 + x + 3)/x

Sympy [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26 \[ \int \frac {-x-98 x^2+e^x \left (-28 x^2-14 x^3\right )+e^{2 x} \left (-2 x^2-2 x^3\right )+\left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right ) \log \left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right )}{3 x^2+x^3+49 x^4+14 e^x x^4+e^{2 x} x^4} \, dx=- \frac {\log {\left (x^{2} e^{2 x} + 14 x^{2} e^{x} + 49 x^{2} + x + 3 \right )}}{x} \]

[In]

integrate(((exp(x)**2*x**2+14*exp(x)*x**2+49*x**2+x+3)*ln(exp(x)**2*x**2+14*exp(x)*x**2+49*x**2+x+3)+(-2*x**3-
2*x**2)*exp(x)**2+(-14*x**3-28*x**2)*exp(x)-98*x**2-x)/(exp(x)**2*x**4+14*exp(x)*x**4+49*x**4+x**3+3*x**2),x)

[Out]

-log(x**2*exp(2*x) + 14*x**2*exp(x) + 49*x**2 + x + 3)/x

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26 \[ \int \frac {-x-98 x^2+e^x \left (-28 x^2-14 x^3\right )+e^{2 x} \left (-2 x^2-2 x^3\right )+\left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right ) \log \left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right )}{3 x^2+x^3+49 x^4+14 e^x x^4+e^{2 x} x^4} \, dx=-\frac {\log \left (x^{2} e^{\left (2 \, x\right )} + 14 \, x^{2} e^{x} + 49 \, x^{2} + x + 3\right )}{x} \]

[In]

integrate(((exp(x)^2*x^2+14*exp(x)*x^2+49*x^2+x+3)*log(exp(x)^2*x^2+14*exp(x)*x^2+49*x^2+x+3)+(-2*x^3-2*x^2)*e
xp(x)^2+(-14*x^3-28*x^2)*exp(x)-98*x^2-x)/(exp(x)^2*x^4+14*exp(x)*x^4+49*x^4+x^3+3*x^2),x, algorithm="maxima")

[Out]

-log(x^2*e^(2*x) + 14*x^2*e^x + 49*x^2 + x + 3)/x

Giac [A] (verification not implemented)

none

Time = 0.42 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26 \[ \int \frac {-x-98 x^2+e^x \left (-28 x^2-14 x^3\right )+e^{2 x} \left (-2 x^2-2 x^3\right )+\left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right ) \log \left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right )}{3 x^2+x^3+49 x^4+14 e^x x^4+e^{2 x} x^4} \, dx=-\frac {\log \left (x^{2} e^{\left (2 \, x\right )} + 14 \, x^{2} e^{x} + 49 \, x^{2} + x + 3\right )}{x} \]

[In]

integrate(((exp(x)^2*x^2+14*exp(x)*x^2+49*x^2+x+3)*log(exp(x)^2*x^2+14*exp(x)*x^2+49*x^2+x+3)+(-2*x^3-2*x^2)*e
xp(x)^2+(-14*x^3-28*x^2)*exp(x)-98*x^2-x)/(exp(x)^2*x^4+14*exp(x)*x^4+49*x^4+x^3+3*x^2),x, algorithm="giac")

[Out]

-log(x^2*e^(2*x) + 14*x^2*e^x + 49*x^2 + x + 3)/x

Mupad [B] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26 \[ \int \frac {-x-98 x^2+e^x \left (-28 x^2-14 x^3\right )+e^{2 x} \left (-2 x^2-2 x^3\right )+\left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right ) \log \left (3+x+49 x^2+14 e^x x^2+e^{2 x} x^2\right )}{3 x^2+x^3+49 x^4+14 e^x x^4+e^{2 x} x^4} \, dx=-\frac {\ln \left (x+14\,x^2\,{\mathrm {e}}^x+x^2\,{\mathrm {e}}^{2\,x}+49\,x^2+3\right )}{x} \]

[In]

int(-(x + exp(x)*(28*x^2 + 14*x^3) + exp(2*x)*(2*x^2 + 2*x^3) + 98*x^2 - log(x + 14*x^2*exp(x) + x^2*exp(2*x)
+ 49*x^2 + 3)*(x + 14*x^2*exp(x) + x^2*exp(2*x) + 49*x^2 + 3))/(14*x^4*exp(x) + x^4*exp(2*x) + 3*x^2 + x^3 + 4
9*x^4),x)

[Out]

-log(x + 14*x^2*exp(x) + x^2*exp(2*x) + 49*x^2 + 3)/x