Optimal. Leaf size=82 \[ 2 \sqrt {x+\sqrt {a^2+x^2}}-2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right )-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2144, 470, 335,
218, 212, 209} \begin {gather*} 2 \sqrt {\sqrt {a^2+x^2}+x}-2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right )-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 212
Rule 218
Rule 335
Rule 470
Rule 2144
Rubi steps
\begin {align*} \int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \, dx &=\text {Subst}\left (\int \frac {a^2+x^2}{\sqrt {x} \left (-a^2+x^2\right )} \, dx,x,x+\sqrt {a^2+x^2}\right )\\ &=2 \sqrt {x+\sqrt {a^2+x^2}}+\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (-a^2+x^2\right )} \, dx,x,x+\sqrt {a^2+x^2}\right )\\ &=2 \sqrt {x+\sqrt {a^2+x^2}}+\left (4 a^2\right ) \text {Subst}\left (\int \frac {1}{-a^2+x^4} \, dx,x,\sqrt {x+\sqrt {a^2+x^2}}\right )\\ &=2 \sqrt {x+\sqrt {a^2+x^2}}-(2 a) \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\sqrt {x+\sqrt {a^2+x^2}}\right )-(2 a) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,\sqrt {x+\sqrt {a^2+x^2}}\right )\\ &=2 \sqrt {x+\sqrt {a^2+x^2}}-2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right )-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 82, normalized size = 1.00 \begin {gather*} 2 \sqrt {x+\sqrt {a^2+x^2}}-2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right )-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 3.54, size = 33, normalized size = 0.40 \begin {gather*} -\frac {\sqrt {2} \sqrt {x} \text {Gamma}\left [-\frac {1}{4}\right ] \text {hyper}\left [\left \{-\frac {1}{4},-\frac {1}{4},\frac {1}{4}\right \},\left \{\frac {1}{2},\frac {3}{4}\right \},\frac {a^2 \text {exp\_polar}\left [I \text {Pi}\right ]}{x^2}\right ]}{2 \text {Gamma}\left [\frac {3}{4}\right ]} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 5 vs. order
3.
time = 0.03, size = 25, normalized size = 0.30
method | result | size |
meijerg | \(2 \sqrt {2}\, \sqrt {x}\, \hypergeom \left (\left [-\frac {1}{4}, -\frac {1}{4}, \frac {1}{4}\right ], \left [\frac {1}{2}, \frac {3}{4}\right ], -\frac {a^{2}}{x^{2}}\right )\) | \(25\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 216, normalized size = 2.63 \begin {gather*} \left [-2 \, \sqrt {a} \arctan \left (\frac {\sqrt {x + \sqrt {a^{2} + x^{2}}}}{\sqrt {a}}\right ) + \sqrt {a} \log \left (\frac {a^{2} + \sqrt {a^{2} + x^{2}} a - {\left ({\left (a - x\right )} \sqrt {a} + \sqrt {a^{2} + x^{2}} \sqrt {a}\right )} \sqrt {x + \sqrt {a^{2} + x^{2}}}}{x}\right ) + 2 \, \sqrt {x + \sqrt {a^{2} + x^{2}}}, 2 \, \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {x + \sqrt {a^{2} + x^{2}}}}{a}\right ) + \sqrt {-a} \log \left (-\frac {a^{2} - \sqrt {a^{2} + x^{2}} a + {\left (\sqrt {-a} {\left (a + x\right )} - \sqrt {a^{2} + x^{2}} \sqrt {-a}\right )} \sqrt {x + \sqrt {a^{2} + x^{2}}}}{x}\right ) + 2 \, \sqrt {x + \sqrt {a^{2} + x^{2}}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 1.73, size = 51, normalized size = 0.62 \begin {gather*} \frac {\sqrt {x} \Gamma ^{2}\left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right ) {{}_{3}F_{2}\left (\begin {matrix} - \frac {1}{4}, - \frac {1}{4}, \frac {1}{4} \\ \frac {1}{2}, \frac {3}{4} \end {matrix}\middle | {\frac {a^{2} e^{i \pi }}{x^{2}}} \right )}}{8 \pi \Gamma \left (\frac {3}{4}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] N/A
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________