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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0183818, antiderivative size = 24, normalized size of antiderivative = 1., 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 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]

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 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]

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.0092501, 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

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 21, normalized size = 0.9 \begin{align*}{\frac{b{x}^{2}}{2}}+a\arctan \left ( x \right ) -{\frac{b\ln \left ({x}^{2}+1 \right ) }{2}} \end{align*}

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 = 1.50588, size = 27, normalized size = 1.12 \begin{align*} \frac{1}{2} \, b x^{2} + a \arctan \left (x\right ) - \frac{1}{2} \, b \log \left (x^{2} + 1\right ) \end{align*}

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)

________________________________________________________________________________________

Fricas [A]  time = 1.51032, size = 62, normalized size = 2.58 \begin{align*} \frac{1}{2} \, b x^{2} + a \arctan \left (x\right ) - \frac{1}{2} \, b \log \left (x^{2} + 1\right ) \end{align*}

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)

________________________________________________________________________________________

Sympy [C]  time = 0.304777, size = 34, normalized size = 1.42 \begin{align*} \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 )} \end{align*}

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)

________________________________________________________________________________________

Giac [A]  time = 1.29415, size = 27, normalized size = 1.12 \begin{align*} \frac{1}{2} \, b x^{2} + a \arctan \left (x\right ) - \frac{1}{2} \, b \log \left (x^{2} + 1\right ) \end{align*}

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)