3.1.43 \(\int \frac {1}{1+4 x^2+x^4} \, dx\) [43]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {1107, 209} \begin {gather*} \frac {\text {ArcTan}\left (\frac {x}{\sqrt {2-\sqrt {3}}}\right )}{2 \sqrt {3 \left (2-\sqrt {3}\right )}}-\frac {\text {ArcTan}\left (\frac {x}{\sqrt {2+\sqrt {3}}}\right )}{2 \sqrt {3 \left (2+\sqrt {3}\right )}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + 4*x^2 + x^4)^(-1),x]

[Out]

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

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 1107

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 67, normalized size = 1.00 \begin {gather*} \frac {\tan ^{-1}\left (\frac {x}{\sqrt {2-\sqrt {3}}}\right )}{2 \sqrt {3 \left (2-\sqrt {3}\right )}}-\frac {\tan ^{-1}\left (\frac {x}{\sqrt {2+\sqrt {3}}}\right )}{2 \sqrt {3 \left (2+\sqrt {3}\right )}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + 4*x^2 + x^4)^(-1),x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 60, normalized size = 0.90

method result size
risch \(\frac {\left (\munderset {\textit {\_R} =\RootOf \left (\textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )}{\sum }\frac {\ln \left (-\textit {\_R} +x \right )}{\textit {\_R}^{3}+2 \textit {\_R}}\right )}{4}\) \(33\)
default \(-\frac {\sqrt {3}\, \arctan \left (\frac {2 x}{\sqrt {6}+\sqrt {2}}\right )}{3 \left (\sqrt {6}+\sqrt {2}\right )}+\frac {\sqrt {3}\, \arctan \left (\frac {2 x}{\sqrt {6}-\sqrt {2}}\right )}{3 \sqrt {6}-3 \sqrt {2}}\) \(60\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.61, size = 87, normalized size = 1.30 \begin {gather*} -\frac {1}{3} \, \sqrt {3} \sqrt {\sqrt {3} + 2} \arctan \left (-{\left (x - \sqrt {x^{2} - \sqrt {3} + 2}\right )} \sqrt {\sqrt {3} + 2}\right ) + \frac {1}{3} \, \sqrt {3} \sqrt {-\sqrt {3} + 2} \arctan \left (-x \sqrt {-\sqrt {3} + 2} + \sqrt {x^{2} + \sqrt {3} + 2} \sqrt {-\sqrt {3} + 2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.10, size = 92, normalized size = 1.37 \begin {gather*} - 2 \sqrt {\frac {1}{24} - \frac {\sqrt {3}}{48}} \operatorname {atan}{\left (\frac {x}{\sqrt {3} \sqrt {2 - \sqrt {3}} + 2 \sqrt {2 - \sqrt {3}}} \right )} - 2 \sqrt {\frac {\sqrt {3}}{48} + \frac {1}{24}} \operatorname {atan}{\left (\frac {x}{- 2 \sqrt {\sqrt {3} + 2} + \sqrt {3} \sqrt {\sqrt {3} + 2}} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*sqrt(1/24 - sqrt(3)/48)*atan(x/(sqrt(3)*sqrt(2 - sqrt(3)) + 2*sqrt(2 - sqrt(3)))) - 2*sqrt(sqrt(3)/48 + 1/2
4)*atan(x/(-2*sqrt(sqrt(3) + 2) + sqrt(3)*sqrt(sqrt(3) + 2)))

________________________________________________________________________________________

Giac [A]
time = 0.49, size = 51, normalized size = 0.76 \begin {gather*} \frac {1}{12} \, {\left (\sqrt {6} - 3 \, \sqrt {2}\right )} \arctan \left (\frac {2 \, x}{\sqrt {6} + \sqrt {2}}\right ) + \frac {1}{12} \, {\left (\sqrt {6} + 3 \, \sqrt {2}\right )} \arctan \left (\frac {2 \, x}{\sqrt {6} - \sqrt {2}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/12*(sqrt(6) - 3*sqrt(2))*arctan(2*x/(sqrt(6) + sqrt(2))) + 1/12*(sqrt(6) + 3*sqrt(2))*arctan(2*x/(sqrt(6) -
sqrt(2)))

________________________________________________________________________________________

Mupad [B]
time = 0.20, size = 117, normalized size = 1.75 \begin {gather*} 2\,\mathrm {atanh}\left (\frac {24\,x\,\sqrt {\frac {\sqrt {3}}{48}-\frac {1}{24}}}{2\,\sqrt {3}-4}-\frac {16\,\sqrt {3}\,x\,\sqrt {\frac {\sqrt {3}}{48}-\frac {1}{24}}}{2\,\sqrt {3}-4}\right )\,\sqrt {\frac {\sqrt {3}}{48}-\frac {1}{24}}-2\,\mathrm {atanh}\left (\frac {24\,x\,\sqrt {-\frac {\sqrt {3}}{48}-\frac {1}{24}}}{2\,\sqrt {3}+4}+\frac {16\,\sqrt {3}\,x\,\sqrt {-\frac {\sqrt {3}}{48}-\frac {1}{24}}}{2\,\sqrt {3}+4}\right )\,\sqrt {-\frac {\sqrt {3}}{48}-\frac {1}{24}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*atanh((24*x*(3^(1/2)/48 - 1/24)^(1/2))/(2*3^(1/2) - 4) - (16*3^(1/2)*x*(3^(1/2)/48 - 1/24)^(1/2))/(2*3^(1/2)
 - 4))*(3^(1/2)/48 - 1/24)^(1/2) - 2*atanh((24*x*(- 3^(1/2)/48 - 1/24)^(1/2))/(2*3^(1/2) + 4) + (16*3^(1/2)*x*
(- 3^(1/2)/48 - 1/24)^(1/2))/(2*3^(1/2) + 4))*(- 3^(1/2)/48 - 1/24)^(1/2)

________________________________________________________________________________________