\(\int \frac {2+e^x (-25 e^4-2 x)+50 e^4 x+4 x^2}{25 e^4+2 x} \, dx\) [9077]

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

Optimal result

Integrand size = 38, antiderivative size = 24 \[ \int \frac {2+e^x \left (-25 e^4-2 x\right )+50 e^4 x+4 x^2}{25 e^4+2 x} \, dx=x^2+\log \left (\frac {1}{4} e^{-e^x} \left (25+\frac {2 x}{e^4}\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.79, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {6874, 2225, 712} \[ \int \frac {2+e^x \left (-25 e^4-2 x\right )+50 e^4 x+4 x^2}{25 e^4+2 x} \, dx=x^2-e^x+\log \left (2 x+25 e^4\right ) \]

[In]

Int[(2 + E^x*(-25*E^4 - 2*x) + 50*E^4*x + 4*x^2)/(25*E^4 + 2*x),x]

[Out]

-E^x + x^2 + Log[25*E^4 + 2*x]

Rule 712

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 6874

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

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

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.79 \[ \int \frac {2+e^x \left (-25 e^4-2 x\right )+50 e^4 x+4 x^2}{25 e^4+2 x} \, dx=-e^x+x^2+\log \left (25 e^4+2 x\right ) \]

[In]

Integrate[(2 + E^x*(-25*E^4 - 2*x) + 50*E^4*x + 4*x^2)/(25*E^4 + 2*x),x]

[Out]

-E^x + x^2 + Log[25*E^4 + 2*x]

Maple [A] (verified)

Time = 0.35 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.67

method result size
parallelrisch \(x^{2}-{\mathrm e}^{x}+\ln \left (x +\frac {25 \,{\mathrm e}^{4}}{2}\right )\) \(16\)
norman \(-{\mathrm e}^{x}+x^{2}+\ln \left (25 \,{\mathrm e}^{4}+2 x \right )\) \(18\)
risch \(-{\mathrm e}^{x}+x^{2}+\ln \left (25 \,{\mathrm e}^{4}+2 x \right )\) \(18\)
parts \(-{\mathrm e}^{x}+x^{2}+\ln \left (25 \,{\mathrm e}^{4}+2 x \right )\) \(18\)
default \(-{\mathrm e}^{x}+x^{2}+\ln \left (25 \,{\mathrm e}^{4}+2 x \right )\) \(46\)

[In]

int(((-25*exp(4)-2*x)*exp(x)+50*x*exp(4)+4*x^2+2)/(25*exp(4)+2*x),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.71 \[ \int \frac {2+e^x \left (-25 e^4-2 x\right )+50 e^4 x+4 x^2}{25 e^4+2 x} \, dx=x^{2} - e^{x} + \log \left (2 \, x + 25 \, e^{4}\right ) \]

[In]

integrate(((-25*exp(4)-2*x)*exp(x)+50*x*exp(4)+4*x^2+2)/(25*exp(4)+2*x),x, algorithm="fricas")

[Out]

x^2 - e^x + log(2*x + 25*e^4)

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.62 \[ \int \frac {2+e^x \left (-25 e^4-2 x\right )+50 e^4 x+4 x^2}{25 e^4+2 x} \, dx=x^{2} - e^{x} + \log {\left (2 x + 25 e^{4} \right )} \]

[In]

integrate(((-25*exp(4)-2*x)*exp(x)+50*x*exp(4)+4*x**2+2)/(25*exp(4)+2*x),x)

[Out]

x**2 - exp(x) + log(2*x + 25*exp(4))

Maxima [B] (verification not implemented)

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

Time = 0.23 (sec) , antiderivative size = 56, normalized size of antiderivative = 2.33 \[ \int \frac {2+e^x \left (-25 e^4-2 x\right )+50 e^4 x+4 x^2}{25 e^4+2 x} \, dx=x^{2} - \frac {25}{2} \, {\left (25 \, e^{4} \log \left (2 \, x + 25 \, e^{4}\right ) - 2 \, x\right )} e^{4} - 25 \, x e^{4} + \frac {625}{2} \, e^{8} \log \left (2 \, x + 25 \, e^{4}\right ) - e^{x} + \log \left (2 \, x + 25 \, e^{4}\right ) \]

[In]

integrate(((-25*exp(4)-2*x)*exp(x)+50*x*exp(4)+4*x^2+2)/(25*exp(4)+2*x),x, algorithm="maxima")

[Out]

x^2 - 25/2*(25*e^4*log(2*x + 25*e^4) - 2*x)*e^4 - 25*x*e^4 + 625/2*e^8*log(2*x + 25*e^4) - e^x + log(2*x + 25*
e^4)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.71 \[ \int \frac {2+e^x \left (-25 e^4-2 x\right )+50 e^4 x+4 x^2}{25 e^4+2 x} \, dx=x^{2} - e^{x} + \log \left (2 \, x + 25 \, e^{4}\right ) \]

[In]

integrate(((-25*exp(4)-2*x)*exp(x)+50*x*exp(4)+4*x^2+2)/(25*exp(4)+2*x),x, algorithm="giac")

[Out]

x^2 - e^x + log(2*x + 25*e^4)

Mupad [B] (verification not implemented)

Time = 12.65 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.62 \[ \int \frac {2+e^x \left (-25 e^4-2 x\right )+50 e^4 x+4 x^2}{25 e^4+2 x} \, dx=\ln \left (x+\frac {25\,{\mathrm {e}}^4}{2}\right )-{\mathrm {e}}^x+x^2 \]

[In]

int((50*x*exp(4) - exp(x)*(2*x + 25*exp(4)) + 4*x^2 + 2)/(2*x + 25*exp(4)),x)

[Out]

log(x + (25*exp(4))/2) - exp(x) + x^2