3.258 \(\int \frac {5+x^2}{\sqrt {1-x^2} (1+x^2)^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {527, 12, 377, 203} \[ \frac {\sqrt {1-x^2} x}{x^2+1}+2 \sqrt {2} \tan ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {1-x^2}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(5 + x^2)/(Sqrt[1 - x^2]*(1 + x^2)^2),x]

[Out]

(x*Sqrt[1 - x^2])/(1 + x^2) + 2*Sqrt[2]*ArcTan[(Sqrt[2]*x)/Sqrt[1 - x^2]]

Rule 12

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

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 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 527

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> -Simp[
((b*e - a*f)*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d
)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)
*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rubi steps

\begin {align*} \int \frac {5+x^2}{\sqrt {1-x^2} \left (1+x^2\right )^2} \, dx &=\frac {x \sqrt {1-x^2}}{1+x^2}-\frac {1}{4} \int -\frac {16}{\sqrt {1-x^2} \left (1+x^2\right )} \, dx\\ &=\frac {x \sqrt {1-x^2}}{1+x^2}+4 \int \frac {1}{\sqrt {1-x^2} \left (1+x^2\right )} \, dx\\ &=\frac {x \sqrt {1-x^2}}{1+x^2}+4 \operatorname {Subst}\left (\int \frac {1}{1+2 x^2} \, dx,x,\frac {x}{\sqrt {1-x^2}}\right )\\ &=\frac {x \sqrt {1-x^2}}{1+x^2}+2 \sqrt {2} \tan ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {1-x^2}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.16, size = 85, normalized size = 1.81 \[ \frac {\sqrt {1-x^2} x}{x^2+1}+\frac {\tan ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {1-x^2}}\right )}{\sqrt {2}}+\frac {3 x \tanh ^{-1}\left (\sqrt {2} \sqrt {\frac {x^2}{x^2-1}}\right )}{\sqrt {2} \sqrt {-x^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(5 + x^2)/(Sqrt[1 - x^2]*(1 + x^2)^2),x]

[Out]

(x*Sqrt[1 - x^2])/(1 + x^2) + ArcTan[(Sqrt[2]*x)/Sqrt[1 - x^2]]/Sqrt[2] + (3*x*ArcTanh[Sqrt[2]*Sqrt[x^2/(-1 +
x^2)]])/(Sqrt[2]*Sqrt[-x^2])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.12, size = 54, normalized size = 1.15 \[ \frac {x \sqrt {1-x^2}}{x^2+1}-2 \sqrt {2} \tan ^{-1}\left (\frac {\sqrt {2} x \sqrt {1-x^2}}{x^2-1}\right ) \]

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(5 + x^2)/(Sqrt[1 - x^2]*(1 + x^2)^2),x]

[Out]

(x*Sqrt[1 - x^2])/(1 + x^2) - 2*Sqrt[2]*ArcTan[(Sqrt[2]*x*Sqrt[1 - x^2])/(-1 + x^2)]

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 50, normalized size = 1.06 \[ -\frac {2 \, \sqrt {2} {\left (x^{2} + 1\right )} \arctan \left (\frac {\sqrt {2} \sqrt {-x^{2} + 1}}{2 \, x}\right ) - \sqrt {-x^{2} + 1} x}{x^{2} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(2*sqrt(2)*(x^2 + 1)*arctan(1/2*sqrt(2)*sqrt(-x^2 + 1)/x) - sqrt(-x^2 + 1)*x)/(x^2 + 1)

________________________________________________________________________________________

giac [B]  time = 0.65, size = 123, normalized size = 2.62 \[ \sqrt {2} {\left (\pi \mathrm {sgn}\relax (x) + 2 \, \arctan \left (-\frac {\sqrt {2} x {\left (\frac {{\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{4 \, {\left (\sqrt {-x^{2} + 1} - 1\right )}}\right )\right )} - \frac {2 \, {\left (\frac {x}{\sqrt {-x^{2} + 1} - 1} - \frac {\sqrt {-x^{2} + 1} - 1}{x}\right )}}{{\left (\frac {x}{\sqrt {-x^{2} + 1} - 1} - \frac {\sqrt {-x^{2} + 1} - 1}{x}\right )}^{2} + 8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(2)*(pi*sgn(x) + 2*arctan(-1/4*sqrt(2)*x*((sqrt(-x^2 + 1) - 1)^2/x^2 - 1)/(sqrt(-x^2 + 1) - 1))) - 2*(x/(s
qrt(-x^2 + 1) - 1) - (sqrt(-x^2 + 1) - 1)/x)/((x/(sqrt(-x^2 + 1) - 1) - (sqrt(-x^2 + 1) - 1)/x)^2 + 8)

________________________________________________________________________________________

maple [A]  time = 0.31, size = 53, normalized size = 1.13




method result size



risch \(-\frac {x \left (x^{2}-1\right )}{\left (x^{2}+1\right ) \sqrt {-x^{2}+1}}-2 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {-x^{2}+1}\, x}{x^{2}-1}\right )\) \(53\)
trager \(\frac {x \sqrt {-x^{2}+1}}{x^{2}+1}+\RootOf \left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {-3 \RootOf \left (\textit {\_Z}^{2}+2\right ) x^{2}+4 \sqrt {-x^{2}+1}\, x +\RootOf \left (\textit {\_Z}^{2}+2\right )}{x^{2}+1}\right )\) \(66\)
default \(-2 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {-x^{2}+1}\, x}{x^{2}-1}\right )-\frac {\sqrt {-x^{2}+1}\, x}{2 \left (x^{2}-1\right ) \left (\frac {\left (-x^{2}+1\right ) x^{2}}{\left (x^{2}-1\right )^{2}}+\frac {1}{2}\right )}\) \(70\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+5)/(x^2+1)^2/(-x^2+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x^{2} + 5}{{\left (x^{2} + 1\right )}^{2} \sqrt {-x^{2} + 1}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((x^2 + 5)/((x^2 + 1)^2*sqrt(-x^2 + 1)), x)

________________________________________________________________________________________

mupad [B]  time = 0.13, size = 115, normalized size = 2.45 \[ \sqrt {2}\,\ln \left (\frac {\frac {\sqrt {2}\,\left (-1+x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}-\sqrt {1-x^2}\,1{}\mathrm {i}}{x-\mathrm {i}}\right )\,1{}\mathrm {i}-\sqrt {2}\,\ln \left (\frac {\frac {\sqrt {2}\,\left (1+x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+1{}\mathrm {i}}\right )\,1{}\mathrm {i}+\frac {\sqrt {1-x^2}}{2\,\left (x-\mathrm {i}\right )}+\frac {\sqrt {1-x^2}}{2\,\left (x+1{}\mathrm {i}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2 + 5)/((1 - x^2)^(1/2)*(x^2 + 1)^2),x)

[Out]

2^(1/2)*log(((2^(1/2)*(x*1i - 1)*1i)/2 - (1 - x^2)^(1/2)*1i)/(x - 1i))*1i - 2^(1/2)*log(((2^(1/2)*(x*1i + 1)*1
i)/2 + (1 - x^2)^(1/2)*1i)/(x + 1i))*1i + (1 - x^2)^(1/2)/(2*(x - 1i)) + (1 - x^2)^(1/2)/(2*(x + 1i))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x^{2} + 5}{\sqrt {- \left (x - 1\right ) \left (x + 1\right )} \left (x^{2} + 1\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+5)/(x**2+1)**2/(-x**2+1)**(1/2),x)

[Out]

Integral((x**2 + 5)/(sqrt(-(x - 1)*(x + 1))*(x**2 + 1)**2), x)

________________________________________________________________________________________