Optimal. Leaf size=17 \[ \frac {\left (x+\sqrt {a+x^2}\right )^n}{n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 17, 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 = {2147, 30}
\begin {gather*} \frac {\left (\sqrt {a+x^2}+x\right )^n}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2147
Rubi steps
\begin {align*} \int \frac {\left (x+\sqrt {a+x^2}\right )^n}{\sqrt {a+x^2}} \, dx &=\text {Subst}\left (\int x^{-1+n} \, dx,x,x+\sqrt {a+x^2}\right )\\ &=\frac {\left (x+\sqrt {a+x^2}\right )^n}{n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 17, normalized size = 1.00 \begin {gather*} \frac {\left (x+\sqrt {a+x^2}\right )^n}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \frac {\left (x +\sqrt {x^{2}+a}\right )^{n}}{\sqrt {x^{2}+a}}\, dx\]
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.35, size = 15, normalized size = 0.88 \begin {gather*} \frac {{\left (x + \sqrt {x^{2} + a}\right )}^{n}}{n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 311 vs.
\(2 (12) = 24\).
time = 1.54, size = 311, normalized size = 18.29 \begin {gather*} \begin {cases} \frac {\sqrt {a} a^{\frac {n}{2}} \sinh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{n x \sqrt {\frac {a}{x^{2}} + 1}} - \frac {2 a^{\frac {n}{2}} \cosh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )} \Gamma \left (1 - \frac {n}{2}\right )}{n^{2} \Gamma \left (- \frac {n}{2}\right )} + \frac {a^{\frac {n}{2}} x \cosh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{\sqrt {a} n} + \frac {a^{\frac {n}{2}} x \sinh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{\sqrt {a} n \sqrt {\frac {a}{x^{2}} + 1}} & \text {for}\: \left |{\frac {x^{2}}{a}}\right | > 1 \\\frac {a^{\frac {n}{2}} \sinh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{n \sqrt {1 + \frac {x^{2}}{a}}} - \frac {2 a^{\frac {n}{2}} \cosh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )} \Gamma \left (1 - \frac {n}{2}\right )}{n^{2} \Gamma \left (- \frac {n}{2}\right )} + \frac {a^{\frac {n}{2}} x^{2} \sinh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{a n \sqrt {1 + \frac {x^{2}}{a}}} + \frac {a^{\frac {n}{2}} x \cosh {\left (n \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} - \operatorname {asinh}{\left (\frac {x}{\sqrt {a}} \right )} \right )}}{\sqrt {a} n} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.35, size = 15, normalized size = 0.88 \begin {gather*} \frac {{\left (x + \sqrt {x^{2} + a}\right )}^{n}}{n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.00, size = 15, normalized size = 0.88 \begin {gather*} \frac {{\left (x+\sqrt {x^2+a}\right )}^n}{n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________