3.22.49 \(\int \frac {-e+2 x^2-4 x \log (3)+2 \log ^2(3)}{x^2-2 x \log (3)+\log ^2(3)} \, dx\)

Optimal. Leaf size=26 \[ 9-e^3-x+3 (5+x)-\frac {e}{-x+\log (3)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 14, normalized size of antiderivative = 0.54, number of steps used = 3, number of rules used = 2, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {27, 683} \begin {gather*} 2 x+\frac {e}{x-\log (3)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 683

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] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-e+2 x^2-4 x \log (3)+2 \log ^2(3)}{(x-\log (3))^2} \, dx\\ &=\int \left (2-\frac {e}{(x-\log (3))^2}\right ) \, dx\\ &=2 x+\frac {e}{x-\log (3)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 19, normalized size = 0.73 \begin {gather*} \frac {e}{x-\log (3)}+2 (x-\log (3)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 22, normalized size = 0.85 \begin {gather*} \frac {2 \, x^{2} - 2 \, x \log \relax (3) + e}{x - \log \relax (3)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.17, size = 15, normalized size = 0.58 \begin {gather*} 2 \, x + \frac {e}{x - \log \relax (3)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x + e/(x - log(3))

________________________________________________________________________________________

maple [A]  time = 0.45, size = 16, normalized size = 0.62




method result size



default \(2 x +\frac {{\mathrm e}}{-\ln \relax (3)+x}\) \(16\)
risch \(2 x -\frac {{\mathrm e}}{\ln \relax (3)-x}\) \(17\)
gosper \(-\frac {2 x^{2}-2 \ln \relax (3)^{2}+{\mathrm e}}{\ln \relax (3)-x}\) \(25\)
norman \(\frac {-2 x^{2}+2 \ln \relax (3)^{2}-{\mathrm e}}{\ln \relax (3)-x}\) \(26\)
meijerg \(\frac {2 x}{1-\frac {x}{\ln \relax (3)}}-4 \ln \relax (3) \left (\frac {x}{\ln \relax (3) \left (1-\frac {x}{\ln \relax (3)}\right )}+\ln \left (1-\frac {x}{\ln \relax (3)}\right )\right )-\frac {{\mathrm e} x}{\ln \relax (3)^{2} \left (1-\frac {x}{\ln \relax (3)}\right )}-2 \ln \relax (3) \left (-\frac {x \left (-\frac {3 x}{\ln \relax (3)}+6\right )}{3 \ln \relax (3) \left (1-\frac {x}{\ln \relax (3)}\right )}-2 \ln \left (1-\frac {x}{\ln \relax (3)}\right )\right )\) \(112\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 15, normalized size = 0.58 \begin {gather*} 2 \, x + \frac {e}{x - \log \relax (3)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x + e/(x - log(3))

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 15, normalized size = 0.58 \begin {gather*} 2\,x+\frac {\mathrm {e}}{x-\ln \relax (3)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x + exp(1)/(x - log(3))

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 10, normalized size = 0.38 \begin {gather*} 2 x + \frac {e}{x - \log {\relax (3 )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x + E/(x - log(3))

________________________________________________________________________________________