3.12.13 \(\int \frac {\sqrt {1+6 x^2+x^4}}{x (1+x^2)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 78, normalized size of antiderivative = 0.94, number of steps used = 9, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {1251, 895, 724, 206, 843, 621, 204} \begin {gather*} -\tan ^{-1}\left (\frac {1-x^2}{\sqrt {x^4+6 x^2+1}}\right )+\frac {1}{2} \tanh ^{-1}\left (\frac {x^2+3}{\sqrt {x^4+6 x^2+1}}\right )-\frac {1}{2} \tanh ^{-1}\left (\frac {3 x^2+1}{\sqrt {x^4+6 x^2+1}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 204

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

Rule 206

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

Rule 621

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 843

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dis
t[g/e, Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + b*x + c*x^
2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&&  !IGtQ[m, 0]

Rule 895

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)/(((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))), x_Symbol] :> Dist[(c
*d^2 - b*d*e + a*e^2)/(e*(e*f - d*g)), Int[(a + b*x + c*x^2)^(p - 1)/(d + e*x), x], x] - Dist[1/(e*(e*f - d*g)
), Int[(Simp[c*d*f - b*e*f + a*e*g - c*(e*f - d*g)*x, x]*(a + b*x + c*x^2)^(p - 1))/(f + g*x), x], x] /; FreeQ
[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && Fra
ctionQ[p] && GtQ[p, 0]

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
 IntegerQ[(m - 1)/2]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 89, normalized size = 1.07 \begin {gather*} -\tan ^{-1}\left (\frac {4-4 x^2}{4 \sqrt {x^4+6 x^2+1}}\right )+\frac {1}{2} \tanh ^{-1}\left (\frac {2 x^2+6}{2 \sqrt {x^4+6 x^2+1}}\right )-\frac {1}{2} \tanh ^{-1}\left (\frac {6 x^2+2}{2 \sqrt {x^4+6 x^2+1}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.18, size = 83, normalized size = 1.00 \begin {gather*} -2 \tan ^{-1}\left (\frac {1}{2}+\frac {x^2}{2}-\frac {1}{2} \sqrt {1+6 x^2+x^4}\right )-\tanh ^{-1}\left (2+x^2-\sqrt {1+6 x^2+x^4}\right )-\frac {1}{2} \log \left (1-x^2+\sqrt {1+6 x^2+x^4}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[Sqrt[1 + 6*x^2 + x^4]/(x*(1 + x^2)),x]

[Out]

-2*ArcTan[1/2 + x^2/2 - Sqrt[1 + 6*x^2 + x^4]/2] - ArcTanh[2 + x^2 - Sqrt[1 + 6*x^2 + x^4]] - Log[1 - x^2 + Sq
rt[1 + 6*x^2 + x^4]]/2

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 79, normalized size = 0.95 \begin {gather*} 2 \, \arctan \left (-\frac {1}{2} \, x^{2} + \frac {1}{2} \, \sqrt {x^{4} + 6 \, x^{2} + 1} - \frac {1}{2}\right ) - \frac {1}{2} \, \log \left (x^{4} + 4 \, x^{2} - \sqrt {x^{4} + 6 \, x^{2} + 1} {\left (x^{2} + 1\right )} - 1\right ) + \frac {1}{2} \, \log \left (-x^{2} + \sqrt {x^{4} + 6 \, x^{2} + 1} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.18, size = 91, normalized size = 1.10 \begin {gather*} 2 \, \arctan \left (-\frac {1}{2} \, x^{2} + \frac {1}{2} \, \sqrt {x^{4} + 6 \, x^{2} + 1} - \frac {1}{2}\right ) - \frac {1}{2} \, \log \left (x^{2} - \sqrt {x^{4} + 6 \, x^{2} + 1} + 3\right ) - \frac {1}{2} \, \log \left (-x^{2} + \sqrt {x^{4} + 6 \, x^{2} + 1} + 1\right ) + \frac {1}{2} \, \log \left (-x^{2} + \sqrt {x^{4} + 6 \, x^{2} + 1} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*arctan(-1/2*x^2 + 1/2*sqrt(x^4 + 6*x^2 + 1) - 1/2) - 1/2*log(x^2 - sqrt(x^4 + 6*x^2 + 1) + 3) - 1/2*log(-x^2
 + sqrt(x^4 + 6*x^2 + 1) + 1) + 1/2*log(-x^2 + sqrt(x^4 + 6*x^2 + 1) - 1)

________________________________________________________________________________________

maple [C]  time = 0.43, size = 74, normalized size = 0.89

method result size
trager \(\ln \left (\frac {x^{2}+\sqrt {x^{4}+6 x^{2}+1}-1}{x}\right )+\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) x^{2}-\RootOf \left (\textit {\_Z}^{2}+1\right )-\sqrt {x^{4}+6 x^{2}+1}}{x^{2}+1}\right )\) \(74\)
default \(-\frac {\sqrt {\left (x^{2}+1\right )^{2}+4 x^{2}}}{2}-\ln \left (x^{2}+3+\sqrt {\left (x^{2}+1\right )^{2}+4 x^{2}}\right )+\arctan \left (\frac {4 x^{2}-4}{4 \sqrt {\left (x^{2}+1\right )^{2}+4 x^{2}}}\right )+\frac {\sqrt {x^{4}+6 x^{2}+1}}{2}+\frac {3 \ln \left (x^{2}+3+\sqrt {x^{4}+6 x^{2}+1}\right )}{2}-\frac {\arctanh \left (\frac {6 x^{2}+2}{2 \sqrt {x^{4}+6 x^{2}+1}}\right )}{2}\) \(125\)
elliptic \(-\frac {\sqrt {\left (x^{2}+1\right )^{2}+4 x^{2}}}{2}-\ln \left (x^{2}+3+\sqrt {\left (x^{2}+1\right )^{2}+4 x^{2}}\right )+\arctan \left (\frac {4 x^{2}-4}{4 \sqrt {\left (x^{2}+1\right )^{2}+4 x^{2}}}\right )+\frac {\sqrt {x^{4}+6 x^{2}+1}}{2}+\frac {3 \ln \left (x^{2}+3+\sqrt {x^{4}+6 x^{2}+1}\right )}{2}-\frac {\arctanh \left (\frac {6 x^{2}+2}{2 \sqrt {x^{4}+6 x^{2}+1}}\right )}{2}\) \(125\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4+6*x^2+1)^(1/2)/x/(x^2+1),x,method=_RETURNVERBOSE)

[Out]

ln((x^2+(x^4+6*x^2+1)^(1/2)-1)/x)+RootOf(_Z^2+1)*ln(-(RootOf(_Z^2+1)*x^2-RootOf(_Z^2+1)-(x^4+6*x^2+1)^(1/2))/(
x^2+1))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x^{4} + 6 \, x^{2} + 1}}{{\left (x^{2} + 1\right )} x}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(sqrt(x^4 + 6*x^2 + 1)/((x^2 + 1)*x), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {x^4+6\,x^2+1}}{x\,\left (x^2+1\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((6*x^2 + x^4 + 1)^(1/2)/(x*(x^2 + 1)),x)

[Out]

int((6*x^2 + x^4 + 1)^(1/2)/(x*(x^2 + 1)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x^{4} + 6 x^{2} + 1}}{x \left (x^{2} + 1\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(x**4 + 6*x**2 + 1)/(x*(x**2 + 1)), x)

________________________________________________________________________________________