Integrand size = 23, antiderivative size = 26 \[ \int \frac {\left (\sqrt {1-x}+\sqrt {1+x}\right )^2}{x^2} \, dx=-\frac {2}{x}-\frac {2 \sqrt {1-x^2}}{x}-2 \arcsin (x) \]
[Out]
Time = 0.05 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {6874, 283, 222} \[ \int \frac {\left (\sqrt {1-x}+\sqrt {1+x}\right )^2}{x^2} \, dx=-2 \arcsin (x)-\frac {2 \sqrt {1-x^2}}{x}-\frac {2}{x} \]
[In]
[Out]
Rule 222
Rule 283
Rule 6874
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {2}{x^2}+\frac {2 \sqrt {1-x^2}}{x^2}\right ) \, dx \\ & = -\frac {2}{x}+2 \int \frac {\sqrt {1-x^2}}{x^2} \, dx \\ & = -\frac {2}{x}-\frac {2 \sqrt {1-x^2}}{x}-2 \int \frac {1}{\sqrt {1-x^2}} \, dx \\ & = -\frac {2}{x}-\frac {2 \sqrt {1-x^2}}{x}-2 \sin ^{-1}(x) \\ \end{align*}
Time = 0.14 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.88 \[ \int \frac {\left (\sqrt {1-x}+\sqrt {1+x}\right )^2}{x^2} \, dx=-\frac {2 \left (1+\sqrt {1-x^2}-4 x \arctan \left (\frac {\sqrt {1+x}}{\sqrt {2}-\sqrt {1-x}}\right )\right )}{x} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(49\) vs. \(2(24)=48\).
Time = 0.92 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.92
method | result | size |
default | \(-\frac {2}{x}+\frac {2 \left (-\arcsin \left (x \right ) x -\sqrt {-x^{2}+1}\right ) \sqrt {1-x}\, \sqrt {x +1}}{x \sqrt {-x^{2}+1}}\) | \(50\) |
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.69 \[ \int \frac {\left (\sqrt {1-x}+\sqrt {1+x}\right )^2}{x^2} \, dx=\frac {2 \, {\left (2 \, x \arctan \left (\frac {\sqrt {x + 1} \sqrt {-x + 1} - 1}{x}\right ) - \sqrt {x + 1} \sqrt {-x + 1} - 1\right )}}{x} \]
[In]
[Out]
\[ \int \frac {\left (\sqrt {1-x}+\sqrt {1+x}\right )^2}{x^2} \, dx=\int \frac {\left (\sqrt {1 - x} + \sqrt {x + 1}\right )^{2}}{x^{2}}\, dx \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92 \[ \int \frac {\left (\sqrt {1-x}+\sqrt {1+x}\right )^2}{x^2} \, dx=-\frac {2 \, \sqrt {-x^{2} + 1}}{x} - \frac {2}{x} - 2 \, \arcsin \left (x\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 149 vs. \(2 (24) = 48\).
Time = 0.31 (sec) , antiderivative size = 149, normalized size of antiderivative = 5.73 \[ \int \frac {\left (\sqrt {1-x}+\sqrt {1+x}\right )^2}{x^2} \, dx=-2 \, \pi - \frac {8 \, {\left (\frac {\sqrt {2} - \sqrt {-x + 1}}{\sqrt {x + 1}} - \frac {\sqrt {x + 1}}{\sqrt {2} - \sqrt {-x + 1}}\right )}}{{\left (\frac {\sqrt {2} - \sqrt {-x + 1}}{\sqrt {x + 1}} - \frac {\sqrt {x + 1}}{\sqrt {2} - \sqrt {-x + 1}}\right )}^{2} - 4} - \frac {2}{x} - 4 \, \arctan \left (\frac {\sqrt {x + 1} {\left (\frac {{\left (\sqrt {2} - \sqrt {-x + 1}\right )}^{2}}{x + 1} - 1\right )}}{2 \, {\left (\sqrt {2} - \sqrt {-x + 1}\right )}}\right ) \]
[In]
[Out]
Time = 17.69 (sec) , antiderivative size = 120, normalized size of antiderivative = 4.62 \[ \int \frac {\left (\sqrt {1-x}+\sqrt {1+x}\right )^2}{x^2} \, dx=8\,\mathrm {atan}\left (\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}\right )-\frac {\frac {5\,{\left (\sqrt {1-x}-1\right )}^2}{2\,{\left (\sqrt {x+1}-1\right )}^2}-\frac {1}{2}}{\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}-\frac {{\left (\sqrt {1-x}-1\right )}^3}{{\left (\sqrt {x+1}-1\right )}^3}}-\frac {\sqrt {1-x}-1}{2\,\left (\sqrt {x+1}-1\right )}-\frac {2}{x} \]
[In]
[Out]