3.279 \(\int \frac {a+b x^3}{1+x^2} \, dx\)

Optimal. Leaf size=24 \[ a \tan ^{-1}(x)+\frac {b x^2}{2}-\frac {1}{2} b \log \left (x^2+1\right ) \]

[Out]

1/2*b*x^2+a*arctan(x)-1/2*b*ln(x^2+1)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {1810, 635, 203, 260} \[ a \tan ^{-1}(x)+\frac {b x^2}{2}-\frac {1}{2} b \log \left (x^2+1\right ) \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^3)/(1 + x^2),x]

[Out]

(b*x^2)/2 + a*ArcTan[x] - (b*Log[1 + x^2])/2

Rule 203

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

Rule 260

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

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 1810

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a,
b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {a+b x^3}{1+x^2} \, dx &=\int \left (b x+\frac {a-b x}{1+x^2}\right ) \, dx\\ &=\frac {b x^2}{2}+\int \frac {a-b x}{1+x^2} \, dx\\ &=\frac {b x^2}{2}+a \int \frac {1}{1+x^2} \, dx-b \int \frac {x}{1+x^2} \, dx\\ &=\frac {b x^2}{2}+a \tan ^{-1}(x)-\frac {1}{2} b \log \left (1+x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 22, normalized size = 0.92 \[ a \tan ^{-1}(x)+\frac {1}{2} b \left (x^2-\log \left (x^2+1\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^3)/(1 + x^2),x]

[Out]

a*ArcTan[x] + (b*(x^2 - Log[1 + x^2]))/2

________________________________________________________________________________________

fricas [A]  time = 0.76, size = 20, normalized size = 0.83 \[ \frac {1}{2} \, b x^{2} + a \arctan \relax (x) - \frac {1}{2} \, b \log \left (x^{2} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*b*x^2 + a*arctan(x) - 1/2*b*log(x^2 + 1)

________________________________________________________________________________________

giac [A]  time = 0.29, size = 20, normalized size = 0.83 \[ \frac {1}{2} \, b x^{2} + a \arctan \relax (x) - \frac {1}{2} \, b \log \left (x^{2} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*b*x^2 + a*arctan(x) - 1/2*b*log(x^2 + 1)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 21, normalized size = 0.88 \[ \frac {b \,x^{2}}{2}+a \arctan \relax (x )-\frac {b \ln \left (x^{2}+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*b*x^2+a*arctan(x)-1/2*b*ln(x^2+1)

________________________________________________________________________________________

maxima [A]  time = 2.25, size = 20, normalized size = 0.83 \[ \frac {1}{2} \, b x^{2} + a \arctan \relax (x) - \frac {1}{2} \, b \log \left (x^{2} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*b*x^2 + a*arctan(x) - 1/2*b*log(x^2 + 1)

________________________________________________________________________________________

mupad [B]  time = 2.13, size = 20, normalized size = 0.83 \[ \frac {b\,x^2}{2}-\frac {b\,\ln \left (x^2+1\right )}{2}+a\,\mathrm {atan}\relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b*x^2)/2 - (b*log(x^2 + 1))/2 + a*atan(x)

________________________________________________________________________________________

sympy [C]  time = 0.17, size = 34, normalized size = 1.42 \[ \frac {b x^{2}}{2} + \left (- \frac {i a}{2} - \frac {b}{2}\right ) \log {\left (x - i \right )} + \left (\frac {i a}{2} - \frac {b}{2}\right ) \log {\left (x + i \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**3+a)/(x**2+1),x)

[Out]

b*x**2/2 + (-I*a/2 - b/2)*log(x - I) + (I*a/2 - b/2)*log(x + I)

________________________________________________________________________________________