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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 24, normalized size of antiderivative = 1.00, 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.02, 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]

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 11, normalized size = 0.46 \[ \frac {1}{2} \, \arctan \left (\frac {1}{2} \, x {\left (\sqrt {5} - 1\right )}\right ) \]

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))

________________________________________________________________________________________

giac [A]  time = 0.36, size = 13, normalized size = 0.54 \[ \frac {1}{2} \, \arctan \left (\frac {2 \, x}{\sqrt {5} + 1}\right ) \]

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))

________________________________________________________________________________________

maple [B]  time = 0.03, size = 32, normalized size = 1.33 \[ \frac {4 \arctan \left (\frac {4 x}{2+2 \sqrt {5}}\right )}{\left (\sqrt {5}-1\right ) \left (2+2 \sqrt {5}\right )} \]

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 = 0.98, size = 11, normalized size = 0.46 \[ \frac {1}{2} \, \arctan \left (\frac {1}{2} \, x {\left (\sqrt {5} - 1\right )}\right ) \]

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))

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 45, normalized size = 1.88 \[ \frac {\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,x\,\left (\sqrt {5}+1\right )}{4\,\left (\frac {\sqrt {5}}{4}+\frac {1}{4}\right )\,\sqrt {\sqrt {5}+3}}\right )\,\left (\sqrt {5}+1\right )}{4\,\sqrt {\sqrt {5}+3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2^(1/2)*atan((2^(1/2)*x*(5^(1/2) + 1))/(4*(5^(1/2)/4 + 1/4)*(5^(1/2) + 3)^(1/2)))*(5^(1/2) + 1))/(4*(5^(1/2)
+ 3)^(1/2))

________________________________________________________________________________________

sympy [A]  time = 0.58, size = 15, normalized size = 0.62 \[ - \frac {\operatorname {atan}{\left (x \left (\frac {1}{2} - \frac {\sqrt {5}}{2}\right ) \right )}}{2} \]

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

________________________________________________________________________________________