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

Optimal. Leaf size=18 \[ 3+\log \left (x \left (12-e^2+e^5+x\right )^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 17, normalized size of antiderivative = 0.94, number of steps used = 4, number of rules used = 2, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {6, 631} \begin {gather*} \log (x)+2 \log \left (x+e^5-e^2+12\right ) \end {gather*}

Antiderivative was successfully verified.

[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 631

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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 17, normalized size = 0.94 \begin {gather*} \log (x)+2 \log \left (12-e^2+e^5+x\right ) \end {gather*}

Antiderivative was successfully verified.

[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]

________________________________________________________________________________________

fricas [A]  time = 0.97, size = 15, normalized size = 0.83 \begin {gather*} 2 \, \log \left (x + e^{5} - e^{2} + 12\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

giac [A]  time = 0.22, size = 17, normalized size = 0.94 \begin {gather*} 2 \, \log \left ({\left | x + e^{5} - e^{2} + 12 \right |}\right ) + \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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))

________________________________________________________________________________________

maple [A]  time = 0.36, size = 16, normalized size = 0.89




method result size



default \(2 \ln \left (x -{\mathrm e}^{2}+12+{\mathrm e}^{5}\right )+\ln \relax (x )\) \(16\)
norman \(2 \ln \left (x -{\mathrm e}^{2}+12+{\mathrm e}^{5}\right )+\ln \relax (x )\) \(16\)
risch \(2 \ln \left (x -{\mathrm e}^{2}+12+{\mathrm e}^{5}\right )+\ln \relax (x )\) \(16\)
meijerg \(\frac {{\mathrm e}^{5} \left (-\ln \left (1+\frac {x}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}\right )+\ln \relax (x )-\ln \left ({\mathrm e}^{5}-{\mathrm e}^{2}+12\right )\right )}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}-\frac {{\mathrm e}^{2} \left (-\ln \left (1+\frac {x}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}\right )+\ln \relax (x )-\ln \left ({\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 (1+\frac {x}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}\right )+12 \ln \relax (x )-12 \ln \left ({\mathrm e}^{5}-{\mathrm e}^{2}+12\right )}{{\mathrm e}^{5}-{\mathrm e}^{2}+12}\) \(151\)



Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 15, normalized size = 0.83 \begin {gather*} 2 \, \log \left (x + e^{5} - e^{2} + 12\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

mupad [B]  time = 0.12, size = 15, normalized size = 0.83 \begin {gather*} 2\,\ln \left (x-{\mathrm {e}}^2+{\mathrm {e}}^5+12\right )+\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

sympy [A]  time = 1.04, size = 15, normalized size = 0.83 \begin {gather*} \log {\relax (x )} + 2 \log {\left (x - e^{2} + 12 + e^{5} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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))

________________________________________________________________________________________