3.708 \(\int \frac{12-x}{4+x+\sqrt{-9+6 x}} \, dx\)

Optimal. Leaf size=71 \[ -x+2 \sqrt{3} \sqrt{2 x-3}+10 \log \left (x+\sqrt{3} \sqrt{2 x-3}+4\right )-21 \sqrt{\frac{3}{2}} \tan ^{-1}\left (\frac{\sqrt{6 x-9}+3}{2 \sqrt{6}}\right ) \]

[Out]

-x + 2*Sqrt[3]*Sqrt[-3 + 2*x] - 21*Sqrt[3/2]*ArcTan[(3 + Sqrt[-9 + 6*x])/(2*Sqrt[6])] + 10*Log[4 + x + Sqrt[3]
*Sqrt[-3 + 2*x]]

________________________________________________________________________________________

Rubi [A]  time = 0.109763, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {1628, 634, 618, 204, 628} \[ -x+2 \sqrt{3} \sqrt{2 x-3}+10 \log \left (x+\sqrt{3} \sqrt{2 x-3}+4\right )-21 \sqrt{\frac{3}{2}} \tan ^{-1}\left (\frac{\sqrt{6 x-9}+3}{2 \sqrt{6}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(12 - x)/(4 + x + Sqrt[-9 + 6*x]),x]

[Out]

-x + 2*Sqrt[3]*Sqrt[-3 + 2*x] - 21*Sqrt[3/2]*ArcTan[(3 + Sqrt[-9 + 6*x])/(2*Sqrt[6])] + 10*Log[4 + x + Sqrt[3]
*Sqrt[-3 + 2*x]]

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), 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 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{12-x}{4+x+\sqrt{-9+6 x}} \, dx &=-\left (\frac{1}{3} \operatorname{Subst}\left (\int \frac{x \left (-63+x^2\right )}{33+6 x+x^2} \, dx,x,\sqrt{-9+6 x}\right )\right )\\ &=-\left (\frac{1}{3} \operatorname{Subst}\left (\int \left (-6+x+\frac{6 (33-10 x)}{33+6 x+x^2}\right ) \, dx,x,\sqrt{-9+6 x}\right )\right )\\ &=-x+2 \sqrt{3} \sqrt{-3+2 x}-2 \operatorname{Subst}\left (\int \frac{33-10 x}{33+6 x+x^2} \, dx,x,\sqrt{-9+6 x}\right )\\ &=-x+2 \sqrt{3} \sqrt{-3+2 x}+10 \operatorname{Subst}\left (\int \frac{6+2 x}{33+6 x+x^2} \, dx,x,\sqrt{-9+6 x}\right )-126 \operatorname{Subst}\left (\int \frac{1}{33+6 x+x^2} \, dx,x,\sqrt{-9+6 x}\right )\\ &=-x+2 \sqrt{3} \sqrt{-3+2 x}+10 \log \left (4+x+\sqrt{3} \sqrt{-3+2 x}\right )+252 \operatorname{Subst}\left (\int \frac{1}{-96-x^2} \, dx,x,6+2 \sqrt{-9+6 x}\right )\\ &=-x+2 \sqrt{3} \sqrt{-3+2 x}-21 \sqrt{\frac{3}{2}} \tan ^{-1}\left (\frac{3+\sqrt{3} \sqrt{-3+2 x}}{2 \sqrt{6}}\right )+10 \log \left (4+x+\sqrt{3} \sqrt{-3+2 x}\right )\\ \end{align*}

Mathematica [A]  time = 0.0383051, size = 60, normalized size = 0.85 \[ -x+2 \sqrt{6 x-9}+10 \log \left (x+\sqrt{6 x-9}+4\right )-21 \sqrt{\frac{3}{2}} \tan ^{-1}\left (\frac{\sqrt{6 x-9}+3}{2 \sqrt{6}}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(12 - x)/(4 + x + Sqrt[-9 + 6*x]),x]

[Out]

-x + 2*Sqrt[-9 + 6*x] - 21*Sqrt[3/2]*ArcTan[(3 + Sqrt[-9 + 6*x])/(2*Sqrt[6])] + 10*Log[4 + x + Sqrt[-9 + 6*x]]

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 54, normalized size = 0.8 \begin{align*} 2\,\sqrt{-9+6\,x}+{\frac{3}{2}}-x+10\,\ln \left ( 24+6\,x+6\,\sqrt{-9+6\,x} \right ) -{\frac{21\,\sqrt{6}}{2}\arctan \left ({\frac{\sqrt{6}}{24} \left ( 2\,\sqrt{-9+6\,x}+6 \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((12-x)/(4+x+(-9+6*x)^(1/2)),x)

[Out]

2*(-9+6*x)^(1/2)+3/2-x+10*ln(24+6*x+6*(-9+6*x)^(1/2))-21/2*6^(1/2)*arctan(1/24*(2*(-9+6*x)^(1/2)+6)*6^(1/2))

________________________________________________________________________________________

Maxima [A]  time = 1.48008, size = 69, normalized size = 0.97 \begin{align*} -\frac{21}{2} \, \sqrt{6} \arctan \left (\frac{1}{12} \, \sqrt{6}{\left (\sqrt{6 \, x - 9} + 3\right )}\right ) - x + 2 \, \sqrt{6 \, x - 9} + 10 \, \log \left (6 \, x + 6 \, \sqrt{6 \, x - 9} + 24\right ) + \frac{3}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((12-x)/(4+x+(-9+6*x)^(1/2)),x, algorithm="maxima")

[Out]

-21/2*sqrt(6)*arctan(1/12*sqrt(6)*(sqrt(6*x - 9) + 3)) - x + 2*sqrt(6*x - 9) + 10*log(6*x + 6*sqrt(6*x - 9) +
24) + 3/2

________________________________________________________________________________________

Fricas [A]  time = 1.46101, size = 192, normalized size = 2.7 \begin{align*} -\frac{21}{2} \, \sqrt{3} \sqrt{2} \arctan \left (\frac{1}{12} \, \sqrt{3} \sqrt{2} \sqrt{6 \, x - 9} + \frac{1}{4} \, \sqrt{3} \sqrt{2}\right ) - x + 2 \, \sqrt{6 \, x - 9} + 10 \, \log \left (x + \sqrt{6 \, x - 9} + 4\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((12-x)/(4+x+(-9+6*x)^(1/2)),x, algorithm="fricas")

[Out]

-21/2*sqrt(3)*sqrt(2)*arctan(1/12*sqrt(3)*sqrt(2)*sqrt(6*x - 9) + 1/4*sqrt(3)*sqrt(2)) - x + 2*sqrt(6*x - 9) +
 10*log(x + sqrt(6*x - 9) + 4)

________________________________________________________________________________________

Sympy [A]  time = 33.6422, size = 60, normalized size = 0.85 \begin{align*} - x + 2 \sqrt{6 x - 9} + 10 \log{\left (6 x + 6 \sqrt{6 x - 9} + 24 \right )} - \frac{21 \sqrt{6} \operatorname{atan}{\left (\frac{\sqrt{6} \left (\sqrt{6 x - 9} + 3\right )}{12} \right )}}{2} + \frac{3}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((12-x)/(4+x+(-9+6*x)**(1/2)),x)

[Out]

-x + 2*sqrt(6*x - 9) + 10*log(6*x + 6*sqrt(6*x - 9) + 24) - 21*sqrt(6)*atan(sqrt(6)*(sqrt(6*x - 9) + 3)/12)/2
+ 3/2

________________________________________________________________________________________

Giac [A]  time = 1.17464, size = 117, normalized size = 1.65 \begin{align*} -\frac{1}{6} \, \sqrt{3} \sqrt{2}{\left (10 \, \sqrt{3} \sqrt{2} \log \left (33\right ) - 63 \, \arctan \left (\frac{1}{4} \, \sqrt{3} \sqrt{2}\right )\right )} - \frac{21}{2} \, \sqrt{3} \sqrt{2} \arctan \left (\frac{1}{12} \, \sqrt{3} \sqrt{2}{\left (\sqrt{6 \, x - 9} + 3\right )}\right ) - x + 2 \, \sqrt{6 \, x - 9} + 10 \, \log \left (6 \, x + 6 \, \sqrt{6 \, x - 9} + 24\right ) + \frac{3}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((12-x)/(4+x+(-9+6*x)^(1/2)),x, algorithm="giac")

[Out]

-1/6*sqrt(3)*sqrt(2)*(10*sqrt(3)*sqrt(2)*log(33) - 63*arctan(1/4*sqrt(3)*sqrt(2))) - 21/2*sqrt(3)*sqrt(2)*arct
an(1/12*sqrt(3)*sqrt(2)*(sqrt(6*x - 9) + 3)) - x + 2*sqrt(6*x - 9) + 10*log(6*x + 6*sqrt(6*x - 9) + 24) + 3/2