3.3.97 \(\int \frac {3+x^2+x^3}{(2+x^2)^2} \, dx\) [297]

Optimal. Leaf size=42 \[ \frac {4+x}{4 \left (2+x^2\right )}+\frac {5 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{4 \sqrt {2}}+\frac {1}{2} \log \left (2+x^2\right ) \]

[Out]

1/4*(4+x)/(x^2+2)+1/2*ln(x^2+2)+5/8*arctan(1/2*x*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1828, 649, 209, 266} \begin {gather*} \frac {5 \text {ArcTan}\left (\frac {x}{\sqrt {2}}\right )}{4 \sqrt {2}}+\frac {x+4}{4 \left (x^2+2\right )}+\frac {1}{2} \log \left (x^2+2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(4 + x)/(4*(2 + x^2)) + (5*ArcTan[x/Sqrt[2]])/(4*Sqrt[2]) + Log[2 + x^2]/2

Rule 209

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

Rule 266

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 649

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 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*} \int \frac {3+x^2+x^3}{\left (2+x^2\right )^2} \, dx &=\frac {4+x}{4 \left (2+x^2\right )}-\frac {1}{4} \int \frac {-5-4 x}{2+x^2} \, dx\\ &=\frac {4+x}{4 \left (2+x^2\right )}+\frac {5}{4} \int \frac {1}{2+x^2} \, dx+\int \frac {x}{2+x^2} \, dx\\ &=\frac {4+x}{4 \left (2+x^2\right )}+\frac {5 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{4 \sqrt {2}}+\frac {1}{2} \log \left (2+x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 42, normalized size = 1.00 \begin {gather*} \frac {4+x}{4 \left (2+x^2\right )}+\frac {5 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{4 \sqrt {2}}+\frac {1}{2} \log \left (2+x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(4 + x)/(4*(2 + x^2)) + (5*ArcTan[x/Sqrt[2]])/(4*Sqrt[2]) + Log[2 + x^2]/2

________________________________________________________________________________________

Maple [A]
time = 0.19, size = 35, normalized size = 0.83

method result size
default \(\frac {\frac {x}{4}+1}{x^{2}+2}+\frac {\ln \left (x^{2}+2\right )}{2}+\frac {5 \arctan \left (\frac {\sqrt {2}\, x}{2}\right ) \sqrt {2}}{8}\) \(35\)
risch \(\frac {\frac {x}{4}+1}{x^{2}+2}+\frac {\ln \left (x^{2}+2\right )}{2}+\frac {5 \arctan \left (\frac {\sqrt {2}\, x}{2}\right ) \sqrt {2}}{8}\) \(35\)
meijerg \(\frac {3 \sqrt {2}\, \left (\frac {\sqrt {2}\, x}{x^{2}+2}+\arctan \left (\frac {\sqrt {2}\, x}{2}\right )\right )}{8}-\frac {x^{2}}{4 \left (1+\frac {x^{2}}{2}\right )}+\frac {\ln \left (1+\frac {x^{2}}{2}\right )}{2}+\frac {\sqrt {2}\, \left (-\frac {x \sqrt {2}}{2 \left (1+\frac {x^{2}}{2}\right )}+\arctan \left (\frac {\sqrt {2}\, x}{2}\right )\right )}{4}\) \(79\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(1/4*x+1)/(x^2+2)+1/2*ln(x^2+2)+5/8*arctan(1/2*2^(1/2)*x)*2^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 33, normalized size = 0.79 \begin {gather*} \frac {5}{8} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + \frac {x + 4}{4 \, {\left (x^{2} + 2\right )}} + \frac {1}{2} \, \log \left (x^{2} + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/8*sqrt(2)*arctan(1/2*sqrt(2)*x) + 1/4*(x + 4)/(x^2 + 2) + 1/2*log(x^2 + 2)

________________________________________________________________________________________

Fricas [A]
time = 0.43, size = 44, normalized size = 1.05 \begin {gather*} \frac {5 \, \sqrt {2} {\left (x^{2} + 2\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + 4 \, {\left (x^{2} + 2\right )} \log \left (x^{2} + 2\right ) + 2 \, x + 8}{8 \, {\left (x^{2} + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*(5*sqrt(2)*(x^2 + 2)*arctan(1/2*sqrt(2)*x) + 4*(x^2 + 2)*log(x^2 + 2) + 2*x + 8)/(x^2 + 2)

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 36, normalized size = 0.86 \begin {gather*} \frac {x + 4}{4 x^{2} + 8} + \frac {\log {\left (x^{2} + 2 \right )}}{2} + \frac {5 \sqrt {2} \operatorname {atan}{\left (\frac {\sqrt {2} x}{2} \right )}}{8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + 4)/(4*x**2 + 8) + log(x**2 + 2)/2 + 5*sqrt(2)*atan(sqrt(2)*x/2)/8

________________________________________________________________________________________

Giac [A]
time = 3.88, size = 33, normalized size = 0.79 \begin {gather*} \frac {5}{8} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) + \frac {x + 4}{4 \, {\left (x^{2} + 2\right )}} + \frac {1}{2} \, \log \left (x^{2} + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/8*sqrt(2)*arctan(1/2*sqrt(2)*x) + 1/4*(x + 4)/(x^2 + 2) + 1/2*log(x^2 + 2)

________________________________________________________________________________________

Mupad [B]
time = 2.19, size = 39, normalized size = 0.93 \begin {gather*} \frac {\ln \left (x^2+2\right )}{2}+\frac {5\,\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,x}{2}\right )}{8}+\frac {x}{4\,\left (x^2+2\right )}+\frac {1}{x^2+2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x^2 + 2)/2 + (5*2^(1/2)*atan((2^(1/2)*x)/2))/8 + x/(4*(x^2 + 2)) + 1/(x^2 + 2)

________________________________________________________________________________________