\(\int \frac {3 x^2+2 x^3}{\sqrt {-3+2 x+x^2} (-3+x+2 x^2)} \, dx\) [282]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 34, antiderivative size = 36 \[ \int \frac {3 x^2+2 x^3}{\sqrt {-3+2 x+x^2} \left (-3+x+2 x^2\right )} \, dx=\sqrt {-3+2 x+x^2}+\frac {\sqrt {-3+2 x+x^2}}{2 (1-x)} \]

[Out]

(x^2+2*x-3)^(1/2)+1/2*(x^2+2*x-3)^(1/2)/(1-x)

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {1607, 1600, 1652, 664} \[ \int \frac {3 x^2+2 x^3}{\sqrt {-3+2 x+x^2} \left (-3+x+2 x^2\right )} \, dx=\frac {\sqrt {x^2+2 x-3}}{2 (1-x)}+\sqrt {x^2+2 x-3} \]

[In]

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

[Out]

Sqrt[-3 + 2*x + x^2] + Sqrt[-3 + 2*x + x^2]/(2*(1 - x))

Rule 664

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

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1652

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq
, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(d + e*x)^(m + q - 1)*((a + b*x + c*x^2)^(p + 1)/(c*e^(q - 1)*(m
 + q + 2*p + 1))), x] + Dist[1/(c*e^q*(m + q + 2*p + 1)), Int[(d + e*x)^m*(a + b*x + c*x^2)^p*ExpandToSum[c*e^
q*(m + q + 2*p + 1)*Pq - c*f*(m + q + 2*p + 1)*(d + e*x)^q + e*f*(m + p + q)*(d + e*x)^(q - 2)*(b*d - 2*a*e +
(2*c*d - b*e)*x), x], x], x] /; NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, c, d, e, m, p}, x] && PolyQ[Pq, x] &&
 NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - b*d*e + a*e^2, 0]

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

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.72 \[ \int \frac {3 x^2+2 x^3}{\sqrt {-3+2 x+x^2} \left (-3+x+2 x^2\right )} \, dx=\frac {(-3+2 x) \sqrt {-3+2 x+x^2}}{2 (-1+x)} \]

[In]

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

[Out]

((-3 + 2*x)*Sqrt[-3 + 2*x + x^2])/(2*(-1 + x))

Maple [A] (verified)

Time = 0.37 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.58

method result size
gosper \(\frac {\left (2 x -3\right ) \left (3+x \right )}{2 \sqrt {x^{2}+2 x -3}}\) \(21\)
trager \(\frac {\left (2 x -3\right ) \sqrt {x^{2}+2 x -3}}{-2+2 x}\) \(23\)
risch \(\frac {2 x^{2}+3 x -9}{2 \sqrt {x^{2}+2 x -3}}\) \(23\)
default \(\sqrt {x^{2}+2 x -3}-\frac {\sqrt {\left (-1+x \right )^{2}-4+4 x}}{2 \left (-1+x \right )}\) \(31\)

[In]

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

[Out]

1/2*(2*x-3)*(3+x)/(x^2+2*x-3)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.61 \[ \int \frac {3 x^2+2 x^3}{\sqrt {-3+2 x+x^2} \left (-3+x+2 x^2\right )} \, dx=\frac {\sqrt {x^{2} + 2 \, x - 3} {\left (2 \, x - 3\right )}}{2 \, {\left (x - 1\right )}} \]

[In]

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

[Out]

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

Sympy [F]

\[ \int \frac {3 x^2+2 x^3}{\sqrt {-3+2 x+x^2} \left (-3+x+2 x^2\right )} \, dx=\int \frac {x^{2}}{\sqrt {\left (x - 1\right ) \left (x + 3\right )} \left (x - 1\right )}\, dx \]

[In]

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

[Out]

Integral(x**2/(sqrt((x - 1)*(x + 3))*(x - 1)), x)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.78 \[ \int \frac {3 x^2+2 x^3}{\sqrt {-3+2 x+x^2} \left (-3+x+2 x^2\right )} \, dx=\sqrt {x^{2} + 2 \, x - 3} - \frac {\sqrt {x^{2} + 2 \, x - 3}}{2 \, {\left (x - 1\right )}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.83 \[ \int \frac {3 x^2+2 x^3}{\sqrt {-3+2 x+x^2} \left (-3+x+2 x^2\right )} \, dx=\sqrt {x^{2} + 2 \, x - 3} + \frac {2}{x - \sqrt {x^{2} + 2 \, x - 3} - 1} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.53 \[ \int \frac {3 x^2+2 x^3}{\sqrt {-3+2 x+x^2} \left (-3+x+2 x^2\right )} \, dx=\frac {\left (x-\frac {3}{2}\right )\,\sqrt {x^2+2\,x-3}}{x-1} \]

[In]

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

[Out]

((x - 3/2)*(2*x + x^2 - 3)^(1/2))/(x - 1)