\(\int \frac {12-e^2+e^5+3 x}{12 x-e^2 x+e^5 x+x^2} \, dx\) [2101]

   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 = 34, antiderivative size = 18 \[ \int \frac {12-e^2+e^5+3 x}{12 x-e^2 x+e^5 x+x^2} \, dx=3+\log \left (x \left (12-e^2+e^5+x\right )^2\right ) \]

[Out]

3+ln(x*(x-exp(2)+12+exp(5))^2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.94, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {6, 645} \[ \int \frac {12-e^2+e^5+3 x}{12 x-e^2 x+e^5 x+x^2} \, dx=\log (x)+2 \log \left (x+e^5-e^2+12\right ) \]

[In]

Int[(12 - E^2 + E^5 + 3*x)/(12*x - E^2*x + E^5*x + x^2),x]

[Out]

Log[x] + 2*Log[12 - E^2 + E^5 + x]

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 645

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

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

Mathematica [A] (verified)

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

[In]

Integrate[(12 - E^2 + E^5 + 3*x)/(12*x - E^2*x + E^5*x + x^2),x]

[Out]

Log[x] + 2*Log[12 - E^2 + E^5 + x]

Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89

method result size
default \(2 \ln \left (x -{\mathrm e}^{2}+12+{\mathrm e}^{5}\right )+\ln \left (x \right )\) \(16\)
norman \(2 \ln \left (x -{\mathrm e}^{2}+12+{\mathrm e}^{5}\right )+\ln \left (x \right )\) \(16\)
risch \(2 \ln \left (x -{\mathrm e}^{2}+12+{\mathrm e}^{5}\right )+\ln \left (x \right )\) \(16\)
parallelrisch \(2 \ln \left (x -{\mathrm e}^{2}+12+{\mathrm e}^{5}\right )+\ln \left (x \right )\) \(16\)
meijerg \(\frac {{\mathrm e}^{5} \left (\ln \left (x \right )-\ln \left ({\mathrm e}^{5}-{\mathrm e}^{2}+12\right )-\ln \left (1+\frac {x}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}\right )\right )}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}-\frac {{\mathrm e}^{2} \left (\ln \left (x \right )-\ln \left ({\mathrm e}^{5}-{\mathrm e}^{2}+12\right )-\ln \left (1+\frac {x}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}\right )\right )}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}+3 \ln \left (1+\frac {x}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}\right )+\frac {12 \ln \left (x \right )-12 \ln \left ({\mathrm e}^{5}-{\mathrm e}^{2}+12\right )-12 \ln \left (1+\frac {x}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}\right )}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}\) \(151\)

[In]

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

[Out]

2*ln(x-exp(2)+12+exp(5))+ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {12-e^2+e^5+3 x}{12 x-e^2 x+e^5 x+x^2} \, dx=2 \, \log \left (x + e^{5} - e^{2} + 12\right ) + \log \left (x\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.60 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {12-e^2+e^5+3 x}{12 x-e^2 x+e^5 x+x^2} \, dx=\log {\left (x \right )} + 2 \log {\left (x - e^{2} + 12 + e^{5} \right )} \]

[In]

integrate((exp(5)-exp(2)+3*x+12)/(x*exp(5)-exp(2)*x+x**2+12*x),x)

[Out]

log(x) + 2*log(x - exp(2) + 12 + exp(5))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {12-e^2+e^5+3 x}{12 x-e^2 x+e^5 x+x^2} \, dx=2 \, \log \left (x + e^{5} - e^{2} + 12\right ) + \log \left (x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.94 \[ \int \frac {12-e^2+e^5+3 x}{12 x-e^2 x+e^5 x+x^2} \, dx=2 \, \log \left ({\left | x + e^{5} - e^{2} + 12 \right |}\right ) + \log \left ({\left | x \right |}\right ) \]

[In]

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

[Out]

2*log(abs(x + e^5 - e^2 + 12)) + log(abs(x))

Mupad [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {12-e^2+e^5+3 x}{12 x-e^2 x+e^5 x+x^2} \, dx=2\,\ln \left (x-{\mathrm {e}}^2+{\mathrm {e}}^5+12\right )+\ln \left (x\right ) \]

[In]

int((3*x - exp(2) + exp(5) + 12)/(12*x - x*exp(2) + x*exp(5) + x^2),x)

[Out]

2*log(x - exp(2) + exp(5) + 12) + log(x)