\(\int \frac {3540+240 x-60 x^2}{3600+3480 x+1081 x^2+116 x^3+4 x^4} \, dx\) [7073]

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

Optimal result

Integrand size = 33, antiderivative size = 25 \[ \int \frac {3540+240 x-60 x^2}{3600+3480 x+1081 x^2+116 x^3+4 x^4} \, dx=\frac {-2+x}{2+x-\frac {1}{15} \left (-1+\frac {1}{2 x}\right ) x^2} \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {1694, 12, 1828, 8} \[ \int \frac {3540+240 x-60 x^2}{3600+3480 x+1081 x^2+116 x^3+4 x^4} \, dx=\frac {240 (2-x)}{361-16 \left (x+\frac {29}{4}\right )^2} \]

[In]

Int[(3540 + 240*x - 60*x^2)/(3600 + 3480*x + 1081*x^2 + 116*x^3 + 4*x^4),x]

[Out]

(240*(2 - x))/(361 - 16*(29/4 + x)^2)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1694

Int[(Pq_)*(Q4_)^(p_), x_Symbol] :> With[{a = Coeff[Q4, x, 0], b = Coeff[Q4, x, 1], c = Coeff[Q4, x, 2], d = Co
eff[Q4, x, 3], e = Coeff[Q4, x, 4]}, Subst[Int[SimplifyIntegrand[(Pq /. x -> -d/(4*e) + x)*(a + d^4/(256*e^3)
- b*(d/(8*e)) + (c - 3*(d^2/(8*e)))*x^2 + e*x^4)^p, x], x], x, d/(4*e) + x] /; EqQ[d^3 - 4*c*d*e + 8*b*e^2, 0]
 && NeQ[d, 0]] /; FreeQ[p, x] && PolyQ[Pq, x] && PolyQ[Q4, x, 4] &&  !IGtQ[p, 0]

Rule 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {240 \left (-361+296 x-16 x^2\right )}{\left (361-16 x^2\right )^2} \, dx,x,\frac {29}{4}+x\right ) \\ & = 240 \text {Subst}\left (\int \frac {-361+296 x-16 x^2}{\left (361-16 x^2\right )^2} \, dx,x,\frac {29}{4}+x\right ) \\ & = \frac {240 (2-x)}{361-(29+4 x)^2}-\frac {120}{361} \text {Subst}\left (\int 0 \, dx,x,\frac {29}{4}+x\right ) \\ & = \frac {240 (2-x)}{361-(29+4 x)^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {3540+240 x-60 x^2}{3600+3480 x+1081 x^2+116 x^3+4 x^4} \, dx=-\frac {60 (2-x)}{120+58 x+4 x^2} \]

[In]

Integrate[(3540 + 240*x - 60*x^2)/(3600 + 3480*x + 1081*x^2 + 116*x^3 + 4*x^4),x]

[Out]

(-60*(2 - x))/(120 + 58*x + 4*x^2)

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68

method result size
risch \(\frac {15 x -30}{x^{2}+\frac {29}{2} x +30}\) \(17\)
gosper \(\frac {30 x -60}{2 x^{2}+29 x +60}\) \(18\)
default \(\frac {420}{19 \left (x +12\right )}-\frac {270}{19 \left (5+2 x \right )}\) \(18\)
norman \(\frac {30 x -60}{2 x^{2}+29 x +60}\) \(19\)
parallelrisch \(\frac {60 x -120}{4 x^{2}+58 x +120}\) \(20\)

[In]

int((-60*x^2+240*x+3540)/(4*x^4+116*x^3+1081*x^2+3480*x+3600),x,method=_RETURNVERBOSE)

[Out]

(15*x-30)/(x^2+29/2*x+30)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \frac {3540+240 x-60 x^2}{3600+3480 x+1081 x^2+116 x^3+4 x^4} \, dx=\frac {30 \, {\left (x - 2\right )}}{2 \, x^{2} + 29 \, x + 60} \]

[In]

integrate((-60*x^2+240*x+3540)/(4*x^4+116*x^3+1081*x^2+3480*x+3600),x, algorithm="fricas")

[Out]

30*(x - 2)/(2*x^2 + 29*x + 60)

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.60 \[ \int \frac {3540+240 x-60 x^2}{3600+3480 x+1081 x^2+116 x^3+4 x^4} \, dx=- \frac {60 - 30 x}{2 x^{2} + 29 x + 60} \]

[In]

integrate((-60*x**2+240*x+3540)/(4*x**4+116*x**3+1081*x**2+3480*x+3600),x)

[Out]

-(60 - 30*x)/(2*x**2 + 29*x + 60)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \frac {3540+240 x-60 x^2}{3600+3480 x+1081 x^2+116 x^3+4 x^4} \, dx=\frac {30 \, {\left (x - 2\right )}}{2 \, x^{2} + 29 \, x + 60} \]

[In]

integrate((-60*x^2+240*x+3540)/(4*x^4+116*x^3+1081*x^2+3480*x+3600),x, algorithm="maxima")

[Out]

30*(x - 2)/(2*x^2 + 29*x + 60)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \frac {3540+240 x-60 x^2}{3600+3480 x+1081 x^2+116 x^3+4 x^4} \, dx=\frac {30 \, {\left (x - 2\right )}}{2 \, x^{2} + 29 \, x + 60} \]

[In]

integrate((-60*x^2+240*x+3540)/(4*x^4+116*x^3+1081*x^2+3480*x+3600),x, algorithm="giac")

[Out]

30*(x - 2)/(2*x^2 + 29*x + 60)

Mupad [B] (verification not implemented)

Time = 12.92 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {3540+240 x-60 x^2}{3600+3480 x+1081 x^2+116 x^3+4 x^4} \, dx=\frac {420}{19\,\left (x+12\right )}-\frac {270}{19\,\left (2\,x+5\right )} \]

[In]

int((240*x - 60*x^2 + 3540)/(3480*x + 1081*x^2 + 116*x^3 + 4*x^4 + 3600),x)

[Out]

420/(19*(x + 12)) - 270/(19*(2*x + 5))