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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.027343, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {6, 203} \[ \frac{1}{2} \tan ^{-1}\left (\sqrt{\frac{1}{2} \left (3-\sqrt{5}\right )} x\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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])

Rubi steps

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

Mathematica [C]  time = 0.0240908, size = 39, normalized size = 1.62 \[ \frac{1}{4} i \log \left (-2 i x+\sqrt{5}+1\right )-\frac{1}{4} i \log \left (2 i x+\sqrt{5}+1\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(I/4)*Log[1 + Sqrt[5] - (2*I)*x] - (I/4)*Log[1 + Sqrt[5] + (2*I)*x]

________________________________________________________________________________________

Maple [B]  time = 0.014, size = 32, normalized size = 1.3 \begin{align*} 4\,{\frac{1}{ \left ( \sqrt{5}-1 \right ) \left ( 2+2\,\sqrt{5} \right ) }\arctan \left ( 4\,{\frac{x}{2+2\,\sqrt{5}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.58004, size = 15, normalized size = 0.62 \begin{align*} \frac{1}{2} \, \arctan \left (\frac{1}{2} \, x{\left (\sqrt{5} - 1\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*arctan(1/2*x*(sqrt(5) - 1))

________________________________________________________________________________________

Fricas [A]  time = 1.43206, size = 45, normalized size = 1.88 \begin{align*} \frac{1}{2} \, \arctan \left (\frac{1}{2} \, x{\left (\sqrt{5} - 1\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*arctan(1/2*x*(sqrt(5) - 1))

________________________________________________________________________________________

Sympy [A]  time = 0.203215, size = 14, normalized size = 0.58 \begin{align*} \frac{\operatorname{atan}{\left (x \left (- \frac{1}{2} + \frac{\sqrt{5}}{2}\right ) \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan(x*(-1/2 + sqrt(5)/2))/2

________________________________________________________________________________________

Giac [A]  time = 1.15564, size = 18, normalized size = 0.75 \begin{align*} \frac{1}{2} \, \arctan \left (\frac{2 \, x}{\sqrt{5} + 1}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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