3.1007 \(\int \sqrt{\frac{x^2}{1+x^2}} \, dx\)

Optimal. Leaf size=20 \[ \frac{\sqrt{x^2} \sqrt{x^2+1}}{x} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0044744, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {1958, 15, 261} \[ \frac{\sqrt{x^2} \sqrt{x^2+1}}{x} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1958

Int[(u_.)*(((e_.)*((a_.) + (b_.)*(x_)^(n_.)))/((c_) + (d_.)*(x_)^(n_.)))^(p_), x_Symbol] :> Int[(u*(e*(a + b*x
^n))^p)/(c + d*x^n)^p, x] /; FreeQ[{a, b, c, d, e, n, p}, x] && GtQ[b*d*e, 0] && GtQ[c - (a*d)/b, 0]

Rule 15

Int[(u_.)*((a_.)*(x_)^(n_))^(m_), x_Symbol] :> Dist[(a^IntPart[m]*(a*x^n)^FracPart[m])/x^(n*FracPart[m]), Int[
u*x^(m*n), x], x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[m]

Rule 261

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

Rubi steps

\begin{align*} \int \sqrt{\frac{x^2}{1+x^2}} \, dx &=\int \frac{\sqrt{x^2}}{\sqrt{1+x^2}} \, dx\\ &=\frac{\sqrt{x^2} \int \frac{x}{\sqrt{1+x^2}} \, dx}{x}\\ &=\frac{\sqrt{x^2} \sqrt{1+x^2}}{x}\\ \end{align*}

Mathematica [A]  time = 0.0053422, size = 17, normalized size = 0.85 \[ \frac{x}{\sqrt{\frac{x^2}{x^2+1}}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

x/Sqrt[x^2/(1 + x^2)]

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 23, normalized size = 1.2 \begin{align*}{\frac{{x}^{2}+1}{x}\sqrt{{\frac{{x}^{2}}{{x}^{2}+1}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.87452, size = 9, normalized size = 0.45 \begin{align*} \sqrt{x^{2} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(x^2 + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.61264, size = 45, normalized size = 2.25 \begin{align*} \frac{{\left (x^{2} + 1\right )} \sqrt{\frac{x^{2}}{x^{2} + 1}}}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 0.440631, size = 36, normalized size = 1.8 \begin{align*} x \sqrt{x^{2}} \sqrt{\frac{1}{x^{2} + 1}} + \frac{\sqrt{x^{2}} \sqrt{\frac{1}{x^{2} + 1}}}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*sqrt(x**2)*sqrt(1/(x**2 + 1)) + sqrt(x**2)*sqrt(1/(x**2 + 1))/x

________________________________________________________________________________________

Giac [A]  time = 1.23685, size = 20, normalized size = 1. \begin{align*} \sqrt{x^{2} + 1} \mathrm{sgn}\left (x\right ) - \mathrm{sgn}\left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(x^2 + 1)*sgn(x) - sgn(x)