### 3.2233 $$\int \frac{7-3 x}{-5+2 x+x^2} \, dx$$

Optimal. Leaf size=47 $-\frac{1}{6} \left (9-5 \sqrt{6}\right ) \log \left (x-\sqrt{6}+1\right )-\frac{1}{6} \left (9+5 \sqrt{6}\right ) \log \left (x+\sqrt{6}+1\right )$

[Out]

-((9 - 5*Sqrt[6])*Log[1 - Sqrt[6] + x])/6 - ((9 + 5*Sqrt[6])*Log[1 + Sqrt[6] + x])/6

________________________________________________________________________________________

Rubi [A]  time = 0.026857, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 16, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.125, Rules used = {632, 31} $-\frac{1}{6} \left (9-5 \sqrt{6}\right ) \log \left (x-\sqrt{6}+1\right )-\frac{1}{6} \left (9+5 \sqrt{6}\right ) \log \left (x+\sqrt{6}+1\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-((9 - 5*Sqrt[6])*Log[1 - Sqrt[6] + x])/6 - ((9 + 5*Sqrt[6])*Log[1 + Sqrt[6] + x])/6

Rule 632

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{7-3 x}{-5+2 x+x^2} \, dx &=\frac{1}{6} \left (-9+5 \sqrt{6}\right ) \int \frac{1}{1-\sqrt{6}+x} \, dx-\frac{1}{6} \left (9+5 \sqrt{6}\right ) \int \frac{1}{1+\sqrt{6}+x} \, dx\\ &=-\frac{1}{6} \left (9-5 \sqrt{6}\right ) \log \left (1-\sqrt{6}+x\right )-\frac{1}{6} \left (9+5 \sqrt{6}\right ) \log \left (1+\sqrt{6}+x\right )\\ \end{align*}

Mathematica [A]  time = 0.0375687, size = 47, normalized size = 1. $\frac{1}{6} \left (5 \sqrt{6}-9\right ) \log \left (-x+\sqrt{6}-1\right )+\frac{1}{6} \left (-9-5 \sqrt{6}\right ) \log \left (x+\sqrt{6}+1\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((-9 + 5*Sqrt[6])*Log[-1 + Sqrt[6] - x])/6 + ((-9 - 5*Sqrt[6])*Log[1 + Sqrt[6] + x])/6

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 29, normalized size = 0.6 \begin{align*} -{\frac{3\,\ln \left ({x}^{2}+2\,x-5 \right ) }{2}}-{\frac{5\,\sqrt{6}}{3}{\it Artanh} \left ({\frac{ \left ( 2\,x+2 \right ) \sqrt{6}}{12}} \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-3/2*ln(x^2+2*x-5)-5/3*6^(1/2)*arctanh(1/12*(2*x+2)*6^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.50902, size = 47, normalized size = 1. \begin{align*} \frac{5}{6} \, \sqrt{6} \log \left (\frac{x - \sqrt{6} + 1}{x + \sqrt{6} + 1}\right ) - \frac{3}{2} \, \log \left (x^{2} + 2 \, x - 5\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/6*sqrt(6)*log((x - sqrt(6) + 1)/(x + sqrt(6) + 1)) - 3/2*log(x^2 + 2*x - 5)

________________________________________________________________________________________

Fricas [A]  time = 2.27729, size = 151, normalized size = 3.21 \begin{align*} \frac{5}{6} \, \sqrt{3} \sqrt{2} \log \left (-\frac{2 \, \sqrt{3} \sqrt{2}{\left (x + 1\right )} - x^{2} - 2 \, x - 7}{x^{2} + 2 \, x - 5}\right ) - \frac{3}{2} \, \log \left (x^{2} + 2 \, x - 5\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/6*sqrt(3)*sqrt(2)*log(-(2*sqrt(3)*sqrt(2)*(x + 1) - x^2 - 2*x - 7)/(x^2 + 2*x - 5)) - 3/2*log(x^2 + 2*x - 5)

________________________________________________________________________________________

Sympy [A]  time = 0.111478, size = 44, normalized size = 0.94 \begin{align*} - \left (\frac{3}{2} + \frac{5 \sqrt{6}}{6}\right ) \log{\left (x + 1 + \sqrt{6} \right )} - \left (\frac{3}{2} - \frac{5 \sqrt{6}}{6}\right ) \log{\left (x - \sqrt{6} + 1 \right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(3/2 + 5*sqrt(6)/6)*log(x + 1 + sqrt(6)) - (3/2 - 5*sqrt(6)/6)*log(x - sqrt(6) + 1)

________________________________________________________________________________________

Giac [A]  time = 1.12449, size = 59, normalized size = 1.26 \begin{align*} \frac{5}{6} \, \sqrt{6} \log \left (\frac{{\left | 2 \, x - 2 \, \sqrt{6} + 2 \right |}}{{\left | 2 \, x + 2 \, \sqrt{6} + 2 \right |}}\right ) - \frac{3}{2} \, \log \left ({\left | x^{2} + 2 \, x - 5 \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/6*sqrt(6)*log(abs(2*x - 2*sqrt(6) + 2)/abs(2*x + 2*sqrt(6) + 2)) - 3/2*log(abs(x^2 + 2*x - 5))