3.347 \(\int \frac {3+x+x^2+x^3}{(1+x^2) (3+x^2)} \, dx\)

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

[Out]

arctan(x)+1/2*ln(x^2+3)

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {6725, 203, 260} \[ \frac {1}{2} \log \left (x^2+3\right )+\tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[x] + Log[3 + 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 6725

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 13, normalized size = 1.00 \[ \frac {1}{2} \log \left (x^2+3\right )+\tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[x] + Log[3 + x^2]/2

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 11, normalized size = 0.85 \[ \arctan \relax (x) + \frac {1}{2} \, \log \left (x^{2} + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(x) + 1/2*log(x^2 + 3)

________________________________________________________________________________________

giac [A]  time = 0.30, size = 11, normalized size = 0.85 \[ \arctan \relax (x) + \frac {1}{2} \, \log \left (x^{2} + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(x) + 1/2*log(x^2 + 3)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 12, normalized size = 0.92 \[ \arctan \relax (x )+\frac {\ln \left (x^{2}+3\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(x)+1/2*ln(x^2+3)

________________________________________________________________________________________

maxima [A]  time = 1.33, size = 11, normalized size = 0.85 \[ \arctan \relax (x) + \frac {1}{2} \, \log \left (x^{2} + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(x) + 1/2*log(x^2 + 3)

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 11, normalized size = 0.85 \[ \frac {\ln \left (x^2+3\right )}{2}+\mathrm {atan}\relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x^2 + 3)/2 + atan(x)

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 10, normalized size = 0.77 \[ \frac {\log {\left (x^{2} + 3 \right )}}{2} + \operatorname {atan}{\relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x**2 + 3)/2 + atan(x)

________________________________________________________________________________________